]> git.baikalelectronics.ru Git - kernel.git/commit
bridge: fix crash when set mac address of br interface
authorHong zhi guo <honkiko@gmail.com>
Sat, 23 Mar 2013 02:27:50 +0000 (02:27 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 24 Mar 2013 21:27:28 +0000 (17:27 -0400)
commitc5f6bb35116b816414295348d0a252da3c0c2230
tree3fd73d6097682ac338c6f78981dbc19f7a8a4825
parent0eedcfedc8287c53f5909ba7bd0a858b167e8cde
bridge: fix crash when set mac address of br interface

When I tried to set mac address of a bridge interface to a mac
address which already learned on this bridge, I got system hang.

The cause is straight forward: function br_fdb_change_mac_address
calls fdb_insert with NULL source nbp. Then an fdb lookup is
performed. If an fdb entry is found and it's local, it's OK. But
if it's not local, source is dereferenced for printk without NULL
check.

Signed-off-by: Hong Zhiguo <honkiko@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_fdb.c