linux/drivers/net/bonding
Mitsuo Hayasaka 4d97480b18 bonding: use local function pointer of bond->recv_probe in bond_handle_frame
The bond->recv_probe is called in bond_handle_frame() when
a packet is received, but bond_close() sets it to NULL. So,
a panic occurs when both functions work in parallel.

Why this happen:
After null pointer check of bond->recv_probe, an sk_buff is
duplicated and bond->recv_probe is called in bond_handle_frame.
So, a panic occurs when bond_close() is called between the
check and call of bond->recv_probe.

Patch:
This patch uses a local function pointer of bond->recv_probe
in bond_handle_frame(). So, it can avoid the null pointer
dereference.

Signed-off-by: Mitsuo Hayasaka <mitsuo.hayasaka.hu@hitachi.com>
Cc: Jay Vosburgh <fubar@us.ibm.com>
Cc: Andy Gospodarek <andy@greyhouse.net>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: WANG Cong <xiyou.wangcong@gmail.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-19 00:14:22 -04:00
..
Makefile bonding, ipv4, ipv6, vlan: Handle NETDEV_BONDING_FAILOVER like NETDEV_NOTIFY_PEERS 2011-04-17 23:36:03 -07:00
bond_3ad.c bonding: properly stop queuing work when requested 2011-10-03 13:48:20 -04:00
bond_3ad.h bonding: delete unused ad_timer 2011-06-09 15:02:19 -07:00
bond_alb.c bonding: properly stop queuing work when requested 2011-10-03 13:48:20 -04:00
bond_alb.h bonding: move processing of recv handlers into handle_frame() 2011-04-25 12:00:30 -07:00
bond_debugfs.c bonding: add the debugfs interface to see RLB hash table 2010-12-16 13:16:05 -08:00
bond_ipv6.c bonding: do vlan cleanup 2011-07-21 13:47:58 -07:00
bond_main.c bonding: use local function pointer of bond->recv_probe in bond_handle_frame 2011-10-19 00:14:22 -04:00
bond_procfs.c bonding: add min links parameter to 802.3ad 2011-06-23 02:12:55 -07:00
bond_sysfs.c bonding: fix string comparison errors 2011-07-27 22:39:30 -07:00
bonding.h bonding: do vlan cleanup 2011-07-21 13:47:58 -07:00