Commit 54f0fad3 authored by Jan Kiszka's avatar Jan Kiszka Committed by David S. Miller

CAPI: Use non-atomic allocation during NCCI setup

Both capincci_alloc and capiminor_alloc run in non-atomic context,
update their memory allocations accordingly.
Signed-off-by: default avatarJan Kiszka <jan.kiszka@web.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 05b41494
...@@ -217,7 +217,7 @@ static struct capiminor *capiminor_alloc(struct capi20_appl *ap, u32 ncci) ...@@ -217,7 +217,7 @@ static struct capiminor *capiminor_alloc(struct capi20_appl *ap, u32 ncci)
unsigned int minor = 0; unsigned int minor = 0;
unsigned long flags; unsigned long flags;
mp = kzalloc(sizeof(*mp), GFP_ATOMIC); mp = kzalloc(sizeof(*mp), GFP_KERNEL);
if (!mp) { if (!mp) {
printk(KERN_ERR "capi: can't alloc capiminor\n"); printk(KERN_ERR "capi: can't alloc capiminor\n");
return NULL; return NULL;
...@@ -358,7 +358,7 @@ static struct capincci *capincci_alloc(struct capidev *cdev, u32 ncci) ...@@ -358,7 +358,7 @@ static struct capincci *capincci_alloc(struct capidev *cdev, u32 ncci)
{ {
struct capincci *np, **pp; struct capincci *np, **pp;
np = kzalloc(sizeof(*np), GFP_ATOMIC); np = kzalloc(sizeof(*np), GFP_KERNEL);
if (!np) if (!np)
return NULL; return NULL;
np->ncci = ncci; np->ncci = ncci;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment