tun: Remove unnecessary BUG_ON check in tun_net_xmit
Subsystems (3)
PATCH 1/1 tun: Remove unnecessary BUG_ON check in tun_net_xmit
From: David Ahern <[email protected]>
The BUG_ON for NULL tfile is now redundant due to a recently added null check after the rcu_dereference. Remove the BUG_ON.
Cc Jason Wang <[email protected]>
Signed-off-by David Ahern <[email protected]>
--- drivers/net/tun.c | 2 -- 1 file changed, 2 deletions(-)
drivers/net/tun.c +0 -2
@@ -1078,8 +1078,6 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev)tun_debug (KERN_INFO , tun,"tun_net_xmit %d\n" , skb->len); -BUG_ON (!tfile); -/* Drop if the filter does not like it. * This is a noop if the filter is disabled. * Filter can be enabled only for the TAP devices. */
Signature · 1 line
2.17.1
Quoted 11 lines · David Ahern
From: David Ahern <[email protected]>
The
BUG_ONfor NULL tfile is now redundant due to a recently added null check after thercu_dereference. Remove theBUG_ON.Cc Jason Wang <[email protected]>Signed-off-by David Ahern <[email protected]>--- drivers/net/tun.c | 2 -- 1 file changed, 2 deletions(-)
D'oh. Forgot the net-next label
From: David Ahern <[email protected]>
Date: Fri, 21 Feb 2020 12:53:09 -0700
Quoted 7 lines
From: David Ahern <[email protected]>
The
BUG_ONfor NULL tfile is now redundant due to a recently added null check after thercu_dereference. Remove theBUG_ON.Cc Jason Wang <[email protected]>Signed-off-by David Ahern <[email protected]>
Applied to net-next, thanks David.