Skip to contentSkip to conversation

Oops in IFB

PATCH Applied Nicolas DICHTEL 3 participants 7 messages Jul 20, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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.

drivers/net/ifb.c +1 -0
@@ -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);
 	}
#2 lore raw
Quoted 10 lines · jamal
Quoted 4 lines · Nicolas DICHTEL

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

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

#3 lore raw
Quoted 2 lines · jamal

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

#4 lore raw

Sorry, I forgot the patch ;-)

Nicolas

Quoted 11 lines · Nicolas DICHTEL
Quoted 2 lines · jamal

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

drivers/net/dummy.c +1 -0
@@ -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);
 	}
maintainer
#5 lore raw

From: Nicolas DICHTEL <[email protected]>
Date: Thu, 20 Jul 2006 16:31:16 +0200

Quoted 1 line

Sorry, I forgot the patch ;-)

Also applied, thanks Nicolas.