netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Oops in IFB
@ 2006-07-20 13:33 Nicolas DICHTEL
  2006-07-20 13:40 ` jamal
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas DICHTEL @ 2006-07-20 13:33 UTC (permalink / raw)
  To: netdev

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

Hi,

When there is no memory left for creating all IFB devices (requesting
by user), a oops happens on the system.
Please find enclosed a patch to solve this.


Regards,
Nicolas


[IFB] After ifb_init_one() failed, i is increased. Decrease
it before entering in the loop for freeing the other ifb devices.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>

[-- Attachment #2: x.diff --]
[-- Type: text/x-patch, Size: 274 bytes --]

--- a/drivers/net/ifb.c	2006-07-20 15:16:31.923529050 +0200
+++ b/drivers/net/ifb.c	2006-07-20 15:17:36.370188249 +0200
@@ -271,6 +271,7 @@
 	for (i = 0; i < numifbs && !err; i++)
 		err = ifb_init_one(i); 
 	if (err) { 
+		i--;
 		while (--i >= 0)
 			ifb_free_one(i);
 	}

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

* Re: Oops in IFB
  2006-07-20 13:33 Oops in IFB Nicolas DICHTEL
@ 2006-07-20 13:40 ` jamal
  2006-07-20 13:58   ` jamal
  2006-07-20 23:16   ` David Miller
  0 siblings, 2 replies; 7+ messages in thread
From: jamal @ 2006-07-20 13:40 UTC (permalink / raw)
  To: nicolas.dichtel; +Cc: netdev

On Thu, 2006-20-07 at 15:33 +0200, Nicolas DICHTEL wrote:


> [IFB] After ifb_init_one() failed, i is increased. Decrease
> it before entering in the loop for freeing the other ifb devices.
> 
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>

Thanks Nicolas.

Acked-by: Jamal Hadi Salim <hadi@cyberus.ca>

cheers,
jamal


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

* Re: Oops in IFB
  2006-07-20 13:40 ` jamal
@ 2006-07-20 13:58   ` jamal
  2006-07-20 14:29     ` Nicolas DICHTEL
  2006-07-20 23:16   ` David Miller
  1 sibling, 1 reply; 7+ messages in thread
From: jamal @ 2006-07-20 13:58 UTC (permalink / raw)
  To: nicolas.dichtel; +Cc: netdev

On Thu, 2006-20-07 at 09:40 -0400, jamal wrote:
> On Thu, 2006-20-07 at 15:33 +0200, Nicolas DICHTEL wrote:
> 
> 
> > [IFB] After ifb_init_one() failed, i is increased. Decrease
> > it before entering in the loop for freeing the other ifb devices.
> > 
> > Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> 
> Thanks Nicolas.
> 

BTW, in the name of the LinuxWay(tm) - can you also submit a similar
patch for dummy? It suffers from the same bug.

cheers,
jamal


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

* Re: Oops in IFB
  2006-07-20 13:58   ` jamal
@ 2006-07-20 14:29     ` Nicolas DICHTEL
  2006-07-20 14:31       ` Nicolas DICHTEL
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas DICHTEL @ 2006-07-20 14:29 UTC (permalink / raw)
  To: hadi; +Cc: netdev

jamal a écrit :
> BTW, in the name of the LinuxWay(tm) - can you also submit a similar
> patch for dummy? It suffers from the same bug.
No problem, patch is enclosed.

Cheers,
Nicolas

[DUMMY] Avoid an oops when dummy_init_one() failed

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>

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

* Re: Oops in IFB
  2006-07-20 14:29     ` Nicolas DICHTEL
@ 2006-07-20 14:31       ` Nicolas DICHTEL
  2006-07-20 23:17         ` David Miller
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas DICHTEL @ 2006-07-20 14:31 UTC (permalink / raw)
  To: hadi; +Cc: netdev

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

Sorry, I forgot the patch ;-)

Nicolas

Nicolas DICHTEL a écrit :
> jamal a écrit :
>> BTW, in the name of the LinuxWay(tm) - can you also submit a similar
>> patch for dummy? It suffers from the same bug.
> No problem, patch is enclosed.
>
> Cheers,
> Nicolas
>
> [DUMMY] Avoid an oops when dummy_init_one() failed
>
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>

[-- Attachment #2: x.diff --]
[-- Type: text/x-patch, Size: 285 bytes --]

--- a/drivers/net/dummy.c	2006-07-20 16:19:09.395351558 +0200
+++ b/drivers/net/dummy.c	2006-07-20 16:19:58.802327279 +0200
@@ -132,6 +132,7 @@
 	for (i = 0; i < numdummies && !err; i++)
 		err = dummy_init_one(i); 
 	if (err) { 
+		i--;
 		while (--i >= 0)
 			dummy_free_one(i);
 	}

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

* Re: Oops in IFB
  2006-07-20 13:40 ` jamal
  2006-07-20 13:58   ` jamal
@ 2006-07-20 23:16   ` David Miller
  1 sibling, 0 replies; 7+ messages in thread
From: David Miller @ 2006-07-20 23:16 UTC (permalink / raw)
  To: hadi; +Cc: nicolas.dichtel, netdev

From: jamal <hadi@cyberus.ca>
Date: Thu, 20 Jul 2006 09:40:00 -0400

> On Thu, 2006-20-07 at 15:33 +0200, Nicolas DICHTEL wrote:
> 
> 
> > [IFB] After ifb_init_one() failed, i is increased. Decrease
> > it before entering in the loop for freeing the other ifb devices.
> > 
> > Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> 
> Thanks Nicolas.
> 
> Acked-by: Jamal Hadi Salim <hadi@cyberus.ca>

Applied, thanks a lot.

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

* Re: Oops in IFB
  2006-07-20 14:31       ` Nicolas DICHTEL
@ 2006-07-20 23:17         ` David Miller
  0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2006-07-20 23:17 UTC (permalink / raw)
  To: nicolas.dichtel; +Cc: hadi, netdev

From: Nicolas DICHTEL <nicolas.dichtel@6wind.com>
Date: Thu, 20 Jul 2006 16:31:16 +0200

> Sorry, I forgot the patch ;-)

Also applied, thanks Nicolas.

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

end of thread, other threads:[~2006-07-20 23:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-20 13:33 Oops in IFB Nicolas DICHTEL
2006-07-20 13:40 ` jamal
2006-07-20 13:58   ` jamal
2006-07-20 14:29     ` Nicolas DICHTEL
2006-07-20 14:31       ` Nicolas DICHTEL
2006-07-20 23:17         ` David Miller
2006-07-20 23:16   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).