All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/7] Char: nozomi, use GFP_KERNEL for kfifo allocation
@ 2011-04-20  8:43 Jiri Slaby
  2011-04-20  8:43 ` [PATCH 2/7] Char: nozomi, remove port.count checks Jiri Slaby
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Jiri Slaby @ 2011-04-20  8:43 UTC (permalink / raw)
  To: gregkh; +Cc: jirislaby, linux-kernel, linux-serial, Jiri Slaby

The allocation was moved to probe function in 9842c38e9176. And we can
sleep there. So allocate the 4*8192 bytes as GFP_KERNEL to mitigate
the allocation failure.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Tested-by: Gerald Pfeifer <gerald@pfeifer.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
---
 drivers/tty/nozomi.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/nozomi.c b/drivers/tty/nozomi.c
index fd0a9852..acaecc1 100644
--- a/drivers/tty/nozomi.c
+++ b/drivers/tty/nozomi.c
@@ -1431,8 +1431,8 @@ static int __devinit nozomi_card_init(struct pci_dev *pdev,
 	}
 
 	for (i = PORT_MDM; i < MAX_PORT; i++) {
-		if (kfifo_alloc(&dc->port[i].fifo_ul,
-		      FIFO_BUFFER_SIZE_UL, GFP_ATOMIC)) {
+		if (kfifo_alloc(&dc->port[i].fifo_ul, FIFO_BUFFER_SIZE_UL,
+					GFP_KERNEL)) {
 			dev_err(&pdev->dev,
 					"Could not allocate kfifo buffer\n");
 			ret = -ENOMEM;
-- 
1.7.4.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-04-20  9:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-20  8:43 [PATCH 1/7] Char: nozomi, use GFP_KERNEL for kfifo allocation Jiri Slaby
2011-04-20  8:43 ` [PATCH 2/7] Char: nozomi, remove port.count checks Jiri Slaby
2011-04-20  8:43 ` [PATCH 3/7] Char: nozomi, remove useless tty_sem Jiri Slaby
2011-04-20  9:55   ` Jack Stone
2011-04-20  8:43 ` [PATCH 4/7] Char: moxa, fix locking in moxa_write Jiri Slaby
2011-04-20  8:43 ` [PATCH 5/7] TTY: serial_core, remove invalid test Jiri Slaby
2011-04-20  8:43 ` [PATCH 6/7] TTY: serial_core, remove superfluous set_task_state Jiri Slaby
2011-04-20  8:43 ` [PATCH 7/7] TTY: tty_io, annotate locking functions Jiri Slaby

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.