Skip to content

Commit 856ec7f

Browse files
dlunevjgunthorpe
authored andcommitted
IB/i40iw: Remove bogus call to netdev_master_upper_dev_get()
Local variable netdev is not used in these calls. It should be noted, that this change is required to work in bonded mode. Otherwise we would get the following assert: "RTNL: assertion failed at net/core/dev.c (5665)" With the calltrace as follows: dump_stack+0x19/0x1b netdev_master_upper_dev_get+0x61/0x70 i40iw_addr_resolve_neigh+0x1e8/0x220 i40iw_make_cm_node+0x296/0x700 ? i40iw_find_listener.isra.10+0xcc/0x110 i40iw_receive_ilq+0x3d4/0x810 i40iw_puda_poll_completion+0x341/0x420 i40iw_process_ceq+0xa5/0x280 i40iw_ceq_dpc+0x1e/0x40 tasklet_action+0x83/0x140 __do_softirq+0x125/0x2bb call_softirq+0x1c/0x30 do_softirq+0x65/0xa0 irq_exit+0x105/0x110 do_IRQ+0x56/0xf0 common_interrupt+0x16a/0x16a ? cpuidle_enter_state+0x57/0xd0 cpuidle_idle_call+0xde/0x230 arch_cpu_idle+0xe/0xc0 cpu_startup_entry+0x14a/0x1e0 start_secondary+0x1f7/0x270 start_cpu+0x5/0x14 Link: https://lore.kernel.org/r/20200428131511.11049-1-den@openvz.org Signed-off-by: Denis V. Lunev <den@openvz.org> Acked-by: Shiraz Saleem <shiraz.saleem@intel.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
1 parent 6693ca9 commit 856ec7f

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

drivers/infiniband/hw/i40iw/i40iw_cm.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1987,7 +1987,6 @@ static int i40iw_addr_resolve_neigh(struct i40iw_device *iwdev,
19871987
struct rtable *rt;
19881988
struct neighbour *neigh;
19891989
int rc = arpindex;
1990-
struct net_device *netdev = iwdev->netdev;
19911990
__be32 dst_ipaddr = htonl(dst_ip);
19921991
__be32 src_ipaddr = htonl(src_ip);
19931992

@@ -1997,9 +1996,6 @@ static int i40iw_addr_resolve_neigh(struct i40iw_device *iwdev,
19971996
return rc;
19981997
}
19991998

2000-
if (netif_is_bond_slave(netdev))
2001-
netdev = netdev_master_upper_dev_get(netdev);
2002-
20031999
neigh = dst_neigh_lookup(&rt->dst, &dst_ipaddr);
20042000

20052001
rcu_read_lock();
@@ -2065,7 +2061,6 @@ static int i40iw_addr_resolve_neigh_ipv6(struct i40iw_device *iwdev,
20652061
{
20662062
struct neighbour *neigh;
20672063
int rc = arpindex;
2068-
struct net_device *netdev = iwdev->netdev;
20692064
struct dst_entry *dst;
20702065
struct sockaddr_in6 dst_addr;
20712066
struct sockaddr_in6 src_addr;
@@ -2086,9 +2081,6 @@ static int i40iw_addr_resolve_neigh_ipv6(struct i40iw_device *iwdev,
20862081
return rc;
20872082
}
20882083

2089-
if (netif_is_bond_slave(netdev))
2090-
netdev = netdev_master_upper_dev_get(netdev);
2091-
20922084
neigh = dst_neigh_lookup(dst, dst_addr.sin6_addr.in6_u.u6_addr32);
20932085

20942086
rcu_read_lock();

0 commit comments

Comments
 (0)