]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
netlink: Properly unbind in error conditions.
authorHiroaki SHIMODA <shimoda.hiroaki@gmail.com>
Wed, 12 Nov 2014 19:24:10 +0000 (04:24 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Nov 2014 17:23:07 +0000 (09:23 -0800)
commit93a1c17dae4ace8ed6e8718a0918ba19332053ee
tree5b422c711912f4e93e482ca66f80ddb934d4d12f
parent2326ed5e88f6cecd1e03f7718eb11480f046d887
netlink: Properly unbind in error conditions.

[ Upstream commit 6251edd932ce3faadbfe27b0a0fe79780e0972e9 ]

Even if netlink_kernel_cfg::unbind is implemented the unbind() method is
not called, because cfg->unbind is omitted in __netlink_kernel_create().
And fix wrong argument of test_bit() and off by one problem.

At this point, no unbind() method is implemented, so there is no real
issue.

Fixes: 4f520900522f ("netlink: have netlink per-protocol bind function return an error code.")
Signed-off-by: Hiroaki SHIMODA <shimoda.hiroaki@gmail.com>
Cc: Richard Guy Briggs <rgb@redhat.com>
Acked-by: Richard Guy Briggs <rgb@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/netlink/af_netlink.c