public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH]  SLICOSS - use gfp_kernel where possible
@ 2009-02-11 11:35 Lior Dotan
  2009-03-24 18:31 ` Christopher Harrer
  0 siblings, 1 reply; 3+ messages in thread
From: Lior Dotan @ 2009-02-11 11:35 UTC (permalink / raw)
  To: gregkh; +Cc: Christopher Harrer, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 101 bytes --]

Use GFP_KERNEL instead of GFP_ATOMIC where possible.

Signed_off-by: Lior Dotan <liodot@gmail.com>



[-- Attachment #2: slicoss-gfp-kernel.patch --]
[-- Type: text/plain, Size: 1487 bytes --]

diff -X /usr/src/linux/Documentation/dontdiff -purN a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c
--- a/drivers/staging/slicoss/slicoss.c	2009-02-11 13:33:18.000000000 +0200
+++ b/drivers/staging/slicoss/slicoss.c	2009-02-11 13:32:53.000000000 +0200
@@ -1492,7 +1492,7 @@ static int slic_mcast_add_list(struct ad
 	}
 
 	/* Doesn't already exist.  Allocate a structure to hold it */
-	mcaddr = kmalloc(sizeof(struct mcast_address), GFP_ATOMIC);
+	mcaddr = kmalloc(sizeof(struct mcast_address), GFP_KERNEL);
 	if (mcaddr == NULL)
 		return 1;
 
@@ -2648,7 +2648,7 @@ static int slic_card_init(struct sliccar
 
 #if SLIC_DUMP_ENABLED
 	if (!card->dumpbuffer) {
-		card->dumpbuffer = kmalloc(DUMP_PAGE_SIZE, GFP_ATOMIC);
+		card->dumpbuffer = kmalloc(DUMP_PAGE_SIZE, GFP_KERNEL);
 
 		ASSERT(card->dumpbuffer);
 		if (card->dumpbuffer == NULL)
@@ -2667,7 +2667,7 @@ static int slic_card_init(struct sliccar
 	 *  Allocate COMMAND BUFFER
 	 */
 	if (!card->cmdbuffer) {
-		card->cmdbuffer = kmalloc(sizeof(struct dump_cmd), GFP_ATOMIC);
+		card->cmdbuffer = kmalloc(sizeof(struct dump_cmd), GFP_KERNEL);
 
 		ASSERT(card->cmdbuffer);
 		if (card->cmdbuffer == NULL)
@@ -2808,7 +2808,7 @@ static u32 slic_card_locate(struct adapt
 	}
 	if (!physcard) {
 		/* no structure allocated for this physical card yet */
-		physcard = kzalloc(sizeof(struct physcard), GFP_ATOMIC);
+		physcard = kzalloc(sizeof(struct physcard), GFP_KERNEL);
 		ASSERT(physcard);
 
 		DBG_MSG

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

* RE: [PATCH]  SLICOSS - use gfp_kernel where possible
  2009-02-11 11:35 [PATCH] SLICOSS - use gfp_kernel where possible Lior Dotan
@ 2009-03-24 18:31 ` Christopher Harrer
  2009-04-07 18:28   ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Christopher Harrer @ 2009-03-24 18:31 UTC (permalink / raw)
  To: 'Lior Dotan', gregkh; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 773 bytes --]

> -----Original Message-----
> From: Lior Dotan [mailto:liodot@gmail.com] 
> Sent: Wednesday, February 11, 2009 6:35 AM
> To: gregkh@suse.de
> Cc: Christopher Harrer; linux-kernel@vger.kernel.org
> Subject: [PATCH] SLICOSS - use gfp_kernel where possible
> 
> Use GFP_KERNEL instead of GFP_ATOMIC where possible.
> 
> Signed_off-by: Lior Dotan <liodot@gmail.com>
> 
> 
> 
Hi Greg,

In speaking with Lior, would it be possible to revert this patch?  It's
causing:

> Mar 24 11:50:31 linuxdev kernel: BUG: sleeping function called from 
> invalid context at mm/slub.c:1599 Mar 24 11:50:31 linuxdev kernel: 
> in_atomic(): 1, irqs_disabled(): 0, pid:
> 3251, name: avahi-daemon

Please let me know if you need any additional information or have any
questions.

Cheers,

Chris

[-- Attachment #2: slicoss-gfp-kernel.patch --]
[-- Type: application/octet-stream, Size: 1526 bytes --]

diff -X /usr/src/linux/Documentation/dontdiff -purN a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c
--- a/drivers/staging/slicoss/slicoss.c	2009-02-11 13:33:18.000000000 +0200
+++ b/drivers/staging/slicoss/slicoss.c	2009-02-11 13:32:53.000000000 +0200
@@ -1492,7 +1492,7 @@ static int slic_mcast_add_list(struct ad
 	}
 
 	/* Doesn't already exist.  Allocate a structure to hold it */
-	mcaddr = kmalloc(sizeof(struct mcast_address), GFP_ATOMIC);
+	mcaddr = kmalloc(sizeof(struct mcast_address), GFP_KERNEL);
 	if (mcaddr == NULL)
 		return 1;
 
@@ -2648,7 +2648,7 @@ static int slic_card_init(struct sliccar
 
 #if SLIC_DUMP_ENABLED
 	if (!card->dumpbuffer) {
-		card->dumpbuffer = kmalloc(DUMP_PAGE_SIZE, GFP_ATOMIC);
+		card->dumpbuffer = kmalloc(DUMP_PAGE_SIZE, GFP_KERNEL);
 
 		ASSERT(card->dumpbuffer);
 		if (card->dumpbuffer == NULL)
@@ -2667,7 +2667,7 @@ static int slic_card_init(struct sliccar
 	 *  Allocate COMMAND BUFFER
 	 */
 	if (!card->cmdbuffer) {
-		card->cmdbuffer = kmalloc(sizeof(struct dump_cmd), GFP_ATOMIC);
+		card->cmdbuffer = kmalloc(sizeof(struct dump_cmd), GFP_KERNEL);
 
 		ASSERT(card->cmdbuffer);
 		if (card->cmdbuffer == NULL)
@@ -2808,7 +2808,7 @@ static u32 slic_card_locate(struct adapt
 	}
 	if (!physcard) {
 		/* no structure allocated for this physical card yet */
-		physcard = kzalloc(sizeof(struct physcard), GFP_ATOMIC);
+		physcard = kzalloc(sizeof(struct physcard), GFP_KERNEL);
 		ASSERT(physcard);
 
 		DBG_MSG

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

* Re: [PATCH]  SLICOSS - use gfp_kernel where possible
  2009-03-24 18:31 ` Christopher Harrer
@ 2009-04-07 18:28   ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2009-04-07 18:28 UTC (permalink / raw)
  To: Christopher Harrer; +Cc: 'Lior Dotan', gregkh, linux-kernel

On Tue, Mar 24, 2009 at 02:31:14PM -0400, Christopher Harrer wrote:
> > -----Original Message-----
> > From: Lior Dotan [mailto:liodot@gmail.com] 
> > Sent: Wednesday, February 11, 2009 6:35 AM
> > To: gregkh@suse.de
> > Cc: Christopher Harrer; linux-kernel@vger.kernel.org
> > Subject: [PATCH] SLICOSS - use gfp_kernel where possible
> > 
> > Use GFP_KERNEL instead of GFP_ATOMIC where possible.
> > 
> > Signed_off-by: Lior Dotan <liodot@gmail.com>
> > 
> > 
> > 
> Hi Greg,
> 
> In speaking with Lior, would it be possible to revert this patch?  It's
> causing:
> 
> > Mar 24 11:50:31 linuxdev kernel: BUG: sleeping function called from 
> > invalid context at mm/slub.c:1599 Mar 24 11:50:31 linuxdev kernel: 
> > in_atomic(): 1, irqs_disabled(): 0, pid:
> > 3251, name: avahi-daemon
> 
> Please let me know if you need any additional information or have any
> questions.

Now reverted, sorry for the delay.

greg k-h

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

end of thread, other threads:[~2009-04-07 18:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-11 11:35 [PATCH] SLICOSS - use gfp_kernel where possible Lior Dotan
2009-03-24 18:31 ` Christopher Harrer
2009-04-07 18:28   ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox