]> git.baikalelectronics.ru Git - kernel.git/commit
net/bonding: Fix potential bad memory access during bonding events
authorMoni Shoua <monis@mellanox.com>
Sun, 8 Feb 2015 09:49:32 +0000 (11:49 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 9 Feb 2015 22:03:53 +0000 (14:03 -0800)
commited433e6037ee339da6dbe8dcc622b0f2ee4b964f
tree56ec4d25143890b36edd026b8ab6ec3950d98661
parent420fec7299bed8714f04aca78a51e5532273b265
net/bonding: Fix potential bad memory access during bonding events

When queuing work to send the NETDEV_BONDING_INFO netdev event, it's
possible that when the work is executed, the pointer to the slave
becomes invalid. This can happen if between queuing the event and the
execution of the work, the net-device was un-ensvaled and re-enslaved.

Fix that by queuing a work with the data of the slave instead of the
slave structure.

Fixes: 55f8c118840a ('net/bonding: Notify state change on slaves')
Reported-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: Moni Shoua <monis@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_main.c
include/net/bonding.h