• Arnd Bergmann's avatar
    ipv6: fix false-postive maybe-uninitialized warning · 401481e0
    Arnd Bergmann authored
    Adding a lock around one of the assignments prevents gcc from
    tracking the state of the local 'fibmatch' variable, so it can no
    longer prove that 'dst' is always initialized, leading to a bogus
    warning:
    
    net/ipv6/route.c: In function 'inet6_rtm_getroute':
    net/ipv6/route.c:3659:2: error: 'dst' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    
    This moves the other assignment into the same lock to shut up the
    warning.
    
    Fixes: 121622db ("ipv6: route: make rtm_getroute not assume rtnl is locked")
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    401481e0
route.c 101 KB