diff options
| author | Wei Wang <weiwan@google.com> | 2017-08-14 10:44:59 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-01-22 22:13:55 -0800 |
| commit | 4e4b700a62db72937260375eb23661ac653c2099 (patch) | |
| tree | 291fa2aaf1d53262716e5e527f3e80b7c55e78dc /arch/m32r/kernel/process.c | |
| parent | a5cabe9334b684f828dab1d28167d2b154536851 (diff) | |
ipv6: release rt6->rt6i_idev properly during ifdown
When a dst is created by addrconf_dst_alloc() for a host route or an
anycast route, dst->dev points to loopback dev while rt6->rt6i_idev
points to a real device.
When the real device goes down, the current cleanup code only checks for
dst->dev and assumes rt6->rt6i_idev->dev is the same. This causes the
refcount leak on the real device in the above situation.
This patch makes sure to always release the refcount taken on
rt6->rt6i_idev during dst_dev_put().
Change-Id: Id3d07aebb85432298179c6846986540e2f8b13a9
Fixes: 587fea741134 ("ipv6: mark DST_NOGC and remove the operation of
dst_free()")
Reported-by: John Stultz <john.stultz@linaro.org>
Tested-by: John Stultz <john.stultz@linaro.org>
Tested-by: Martin KaFai Lau <kafai@fb.com>
Signed-off-by: Wei Wang <weiwan@google.com>
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Git-commit: e5645f51ba99738b0e5d708edf9c6454f33b9310
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Tejaswi Tanikella <tejaswit@codeaurora.org>
Diffstat (limited to 'arch/m32r/kernel/process.c')
0 files changed, 0 insertions, 0 deletions
