]> git.baikalelectronics.ru Git - kernel.git/commit
net: Fix Kernel Panic in bonding driver debugfs file: rlb_hash_table
authorPai <vpai@akamai.com>
Wed, 29 Apr 2015 18:24:23 +0000 (14:24 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 29 Apr 2015 19:37:19 +0000 (15:37 -0400)
commit5b1cef60403dafca627db65c3b36afbeedecb53d
tree3526e60e0e789f5998dc0051177dd08b6221fd1d
parentf58442a9cbfdbab6bafa135443db3885f821bb34
net: Fix Kernel Panic in bonding driver debugfs file: rlb_hash_table

This patch fixes a Kernel Panic in bonding driver debugfs file: rlb_hash_table.

$> modprobe bonding mode=6
$> cat /sys/kernel/debug/bonding/bond0/rlb_hash_table

This will crash the kernel. The struct alb_bond_info is initialized only when
the bonding interface is initialized (ip link set bond0 up) and not at the time
it is allocated. If we try to read the table before that, it'll result in a
kernel panic.

The patch applies against both net and net-next

Signed-off-by: Vishwanath Pai <vpai@akamai.com>
Signed-off-by: Andy Gospodarek <gospo@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_main.c