Searched hist:d87d6f44d7c1254fd9560a5191659cb00882db56 (Results 1 – 2 of 2) sorted by relevance
/openbmc/linux/net/dsa/ |
H A D | dsa.c | diff d87d6f44d7c1254fd9560a5191659cb00882db56 Tue Feb 24 15:15:32 CST 2015 Guenter Roeck <linux@roeck-us.net> net: dsa: Ensure that port array elements are initialized before being used
A network device notifier can be called for one or more of the created slave devices before all slave devices have been registered. This can result in a mismatch between ds->phys_port_mask and the registered devices by the time the call is made, and it can result in a slave device being added to a bridge before its entry in ds->ports[] has been initialized.
Rework the initialization code to initialize entries in ds->ports[] in dsa_slave_create. With this change, dsa_slave_create no longer needs to return slave_dev but can return an error code instead.
Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: David S. Miller <davem@davemloft.net>
|
H A D | slave.c | diff d87d6f44d7c1254fd9560a5191659cb00882db56 Tue Feb 24 15:15:32 CST 2015 Guenter Roeck <linux@roeck-us.net> net: dsa: Ensure that port array elements are initialized before being used
A network device notifier can be called for one or more of the created slave devices before all slave devices have been registered. This can result in a mismatch between ds->phys_port_mask and the registered devices by the time the call is made, and it can result in a slave device being added to a bridge before its entry in ds->ports[] has been initialized.
Rework the initialization code to initialize entries in ds->ports[] in dsa_slave_create. With this change, dsa_slave_create no longer needs to return slave_dev but can return an error code instead.
Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: David S. Miller <davem@davemloft.net>
|