• Neil Horman's avatar
    netpoll: fix smatch warnings in netpoll core code · 959d5fde
    Neil Horman authored
    Dan Carpenter contacted me with some notes regarding some smatch warnings in the
    netpoll code, some of which I introduced with my recent netpoll locking fixes,
    some which were there prior.   Specifically they were:
    
    net-next/net/core/netpoll.c:243 netpoll_poll_dev() warn: inconsistent
      returns mutex:&ni->dev_lock: locked (213,217) unlocked (210,243)
    net-next/net/core/netpoll.c:706 netpoll_neigh_reply() warn: potential
      pointer math issue ('skb_transport_header(send_skb)' is a 128 bit pointer)
    
    This patch corrects the locking imbalance (the first error), and adds some
    parenthesis to correct the second error.  Tested by myself. Applies to net-next
    Signed-off-by: default avatarNeil Horman <nhorman@tuxdriver.com>
    CC: Dan Carpenter <dan.carpenter@oracle.com>
    CC: "David S. Miller" <davem@davemloft.net>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    959d5fde
netpoll.c 30.6 KB