Oops in IFB
Subsystems (2)
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); }
jamal
Acked-byQuoted 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.Signed-off-by Nicolas Dichtel <[email protected]>
Thanks Nicolas.
cheers,
jamal
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.Signed-off-by Nicolas Dichtel <[email protected]>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
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
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()failedSigned-off-by Nicolas Dichtel <[email protected]>
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); }
David Miller
maintainerFrom: 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.
From: jamal <[email protected]>
Date: Thu, 20 Jul 2006 09:40:00 -0400
Quoted 11 lines · Nicolas DICHTEL
Quoted 6 lines
[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 <[email protected]>Thanks Nicolas.
Acked-by Jamal Hadi Salim <[email protected]>
Applied, thanks a lot.