diff options
author | David Woodhouse <dwmw2@infradead.org> | 2006-06-25 08:48:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-25 13:01:17 -0400 |
commit | 78dbe706e22f54bce61571ad837238382e1ba5f9 (patch) | |
tree | 4da3f15df037bc9ff7b11c42c17b9bf523a1a930 /drivers | |
parent | c836043e708d50bb301479d0db8e0dc77d4f52ca (diff) |
[PATCH] R3964: fix GFP_KERNEL allocations in timer function
In the error case, add_msg() gets called from timer functions, so should
be using GFP_ATOMIC instead of GFP_KERNEL.
Ref: http://bugzilla.kernel.org/show_bug.cgi?id=6659. Thanks to Christian
Werner <chw@ch-werner.de> for reporting, and for the initial fix.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/n_r3964.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/n_r3964.c b/drivers/char/n_r3964.c index c48de09d68f0..203dc2b661d5 100644 --- a/drivers/char/n_r3964.c +++ b/drivers/char/n_r3964.c | |||
@@ -951,7 +951,8 @@ static void add_msg(struct r3964_client_info *pClient, int msg_id, int arg, | |||
951 | { | 951 | { |
952 | queue_the_message: | 952 | queue_the_message: |
953 | 953 | ||
954 | pMsg = kmalloc(sizeof(struct r3964_message), GFP_KERNEL); | 954 | pMsg = kmalloc(sizeof(struct r3964_message), |
955 | error_code?GFP_ATOMIC:GFP_KERNEL); | ||
955 | TRACE_M("add_msg - kmalloc %p",pMsg); | 956 | TRACE_M("add_msg - kmalloc %p",pMsg); |
956 | if(pMsg==NULL) { | 957 | if(pMsg==NULL) { |
957 | return; | 958 | return; |