diff options
author | Nick Chung <nickchung@google.com> | 2023-12-11 03:49:34 +0000 |
---|---|---|
committer | Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> | 2023-12-12 04:09:13 +0000 |
commit | 76bbf557de512ce8a6c22db97a4d3bf93189abea (patch) | |
tree | 2136619f7732831b5d08bd733139fcf2bb16ebeb | |
parent | a178f5da043b375bb1fd340524baca8d04cf0fb0 (diff) | |
download | lwis-76bbf557de512ce8a6c22db97a4d3bf93189abea.tar.gz |
Top: Use GFP_ATOMIC flag in kmallocandroid-u-qpr2-beta-3_r0.8android-u-qpr2-beta-3.1_r0.8android-14.0.0_r0.77android-14.0.0_r0.67android-14.0.0_r0.57android-gs-shusky-5.15-android14-qpr2-betaandroid-gs-shusky-5.15-android14-qpr2
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.c | 4 |
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 +} |