OSDN Git Service

net/ipv4: Put target net when address dump fails due to bad attributes
authorDavid Ahern <dsahern@gmail.com>
Wed, 24 Oct 2018 19:58:59 +0000 (12:58 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Oct 2018 21:06:25 +0000 (14:06 -0700)
commitd7e38611b81e6d7e14969c361f2b9fc07403a6c3
treed7c384596987946a32670290b45300f3f2dd1fcd
parent01aa9d518eae8a4d75cd3049defc6ed0b6d0a658
net/ipv4: Put target net when address dump fails due to bad attributes

If tgt_net is set based on IFA_TARGET_NETNSID attribute in the dump
request, make sure all error paths call put_net.

Fixes: 5fcd266a9f64 ("net/ipv4: Add support for dumping addresses for a specific device")
Fixes: c33078e3dfb1 ("net/ipv4: Update inet_dump_ifaddr for strict data checking")
Reported-by: Li RongQing <lirongqing@baidu.com>
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/devinet.c