diff options
author | Jason Gunthorpe <jgg@mellanox.com> | 2018-07-29 11:34:59 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2018-08-02 20:27:44 -0600 |
commit | 13476d35bba60b59521ff25d902fdb552b8bf2ac (patch) | |
tree | a6064d13b53ae0cd8cc5ad8f7672244918fbfdff /lib/test_overflow.c | |
parent | 25405d98a2aa0b9983bb9c36b0b00815d39394f4 (diff) | |
download | linux-13476d35bba60b59521ff25d902fdb552b8bf2ac.tar.bz2 |
IB/ipoib: Maintain the child_intfs list from ndo_init/uninit
This fixes a bug in the netlink path where the vlan_rwsem was not
held around __ipoib_vlan_add causing the child_intfs to be manipulated
unsafely.
In the process this greatly simplifies the vlan_rwsem write side locking
to only cover a single non-sleeping statement.
This also further increases the safety of the removal ordering by holding
the netdev of the parent while the child is active to ensure most bugs
become either an oops on a NULL priv or a deadlock on the netdev refcount.
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions