Skip to content

: Some BUGs and deadlocks fixes and a bit of concomitant cleanups.

Pavel Emelyanov netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest8 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8: Do not call free_netdev for already registered device.drivers/net/bonding/bond_main.c+9 -50 replies
2/8: Don't create bondings with % in their names.drivers/net/bonding/bond_main.c+4 -00 replies
3/8: Merge two calls to dev_alloc_name.drivers/net/bonding/bond_main.c+4 -50 replies
4/8: Remove redundant argument from bond_create.drivers/net/bonding/bond_main.c drivers/net/bonding/bond_sysfs.c drivers/net/bonding/bonding.h+4 -70 replies
5/8: Lost semaphores unlock in one of bonding_store_bonds error paths.drivers/net/bonding/bond_sysfs.c+5 -50 replies
6/8: Relax unneeded _safe lists iterations.drivers/net/bonding/bond_main.c drivers/net/bonding/bond_sysfs.c+17 -220 replies
7/8: Remove unneeded list_empty checks.drivers/net/bonding/bond_main.c+0 -90 replies
8/8: Deadlock between bonding_store_bonds and bond_destroy_sysfs.drivers/net/bonding/bond_main.c+4 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/8][BONDING]: Some BUGs and deadlocks fixes and a bit of concomitant cleanups.

Hi Jay, Dave.

While looking at the bonding driver I found four bugs visible with the unaided eye. Here are the fixes, but I also cleaned up some places, I just couldn't come by. If you consider those cleanups to be for next merge window, just kick me and I'll resubmit this set without them.

Found BUGs summary:
1. Bad error path in bond_create - the registered device should not be released with free_netdev;
2. Specifying the 'bond%d' name when creating a new device results in a new device with literally 'bond%d' name, not bond<digit> like for other drivers;
3. Lost unlock of rtnl and bonding_rwsem in bonding_store_bonds;
4. Deadlock between bonding_store_bonds and bond_destroy_sysfs on module unload.

The clean ups are
1. Minor alloc_netdev consolidation after fix #2
2. Redundant 3rd argument for bond_create;
3. Unneeded _safe list iterations in some places;
4. Unneeded list_empty checks in some places.

Details in patches.