[RFC v2 3/4] HID: uhid: Use GFP_ATOMIC in uhid_hid_output_raw

From
Andre Guedes <hidden>
Date
2012-12-01 19:07:45
Reply to
Andre Guedes, 2012-12-01
We should use GFP_ATOMIC in uhid_hid_output_raw as long as it may
be called in atomic section.

Signed-off-by: Andre Guedes <redacted>
---
 drivers/hid/uhid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c
index a5cf905..ef74fc6 100644
--- a/drivers/hid/uhid.c
+++ b/drivers/hid/uhid.c
@@ -261,7 +261,7 @@ static int uhid_hid_output_raw(struct hid_device *hid, __u8 *buf, size_t count,
 	if (count < 1 || count > UHID_DATA_MAX)
 		return -EINVAL;
 
-	ev = kzalloc(sizeof(*ev), GFP_KERNEL);
+	ev = kzalloc(sizeof(*ev), GFP_ATOMIC);
 	if (!ev)
 		return -ENOMEM;
 
-- 
1.8.0.1
Thread (8 messages) 8 messages, 2 authors, last reply 2013-01-15
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help