]> git.baikalelectronics.ru Git - kernel.git/commit
bonding: correctly handle out of range parameters for lp_interval
authorSasha Levin <sasha.levin@oracle.com>
Thu, 6 Mar 2014 21:53:11 +0000 (16:53 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 6 Mar 2014 22:06:17 +0000 (17:06 -0500)
commit5852519d284d39062811757c10c6576d355705f8
treef86025147af2f0f35b6210bd1c668c9c24a943f7
parentd3d716dd79c594bfd2980245c94e3179582ff88a
bonding: correctly handle out of range parameters for lp_interval

We didn't correctly check cases where the value for lp_interval is not
within the legal range due to a missing table terminator.

This would let userspace trigger a kernel panic by specifying a value out
of range:

echo -1 > /sys/devices/virtual/net/bond0/bonding/lp_interval

Introduced by commit b7095343e92 ("bonding: convert lp_interval to use
the new option API").

Acked-by: Nikolay Aleksandrov <nikolay@redhat.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_options.c