summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Chung <nickchung@google.com>2023-12-11 03:49:34 +0000
committerTreehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com>2023-12-12 04:09:13 +0000
commit76bbf557de512ce8a6c22db97a4d3bf93189abea (patch)
tree2136619f7732831b5d08bd733139fcf2bb16ebeb
parenta178f5da043b375bb1fd340524baca8d04cf0fb0 (diff)
downloadlwis-76bbf557de512ce8a6c22db97a4d3bf93189abea.tar.gz
In order to move kmalloc to an atomic context, it should be called with the GFP_ATOMIC flag and within a spinlock. Bug: 315438415 Test: GCA_SMOKE, CTS Change-Id: Idfec377b3773a7aa06db2da5ca9cdd6180dd785b Signed-off-by: Nick Chung <nickchung@google.com> (cherry picked from commit ccfb61d41a2961cbacbb2be8b1488447433f04e0)
-rw-r--r--lwis_device_top.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lwis_device_top.c b/lwis_device_top.c
index e4f1f0d..3bfd0c1 100644
--- a/lwis_device_top.c
+++ b/lwis_device_top.c
@@ -114,7 +114,7 @@ static struct lwis_event_subscriber_list *event_subscriber_list_create(struct lw
struct lwis_top_device *lwis_top_dev =
container_of(lwis_dev, struct lwis_top_device, base_dev);
struct lwis_event_subscriber_list *event_subscriber_list =
- kmalloc(sizeof(struct lwis_event_subscriber_list), GFP_KERNEL);
+ kmalloc(sizeof(struct lwis_event_subscriber_list), GFP_ATOMIC);
if (!event_subscriber_list) {
return NULL;
}
@@ -595,4 +595,4 @@ int lwis_top_device_deinit(void)
{
platform_driver_unregister(&lwis_driver);
return 0;
-} \ No newline at end of file
+}