net: Fix Kernel Panic in bonding driver debugfs file: rlb_hash_table
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 <66242fd87c10ec85caeaa787ce7a11bcd4c68abd@akamai.com>
Signed-off-by: Andy Gospodarek <235a7d7680e417ef53409d6a24f3311a70688752@cumulusnetworks.com>
Signed-off-by: David S. Miller <fe08d3c717adf2ae63592e4c9aec6e3e404d8e3e@davemloft.net>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs