Re: [PATCH] ipv6/addrlabel: fix ip6addrlbl_get()
From: Andrey Ryabinin Date: Mon, 21 Dec 2015 12:54:45 +0300 > ip6addrlbl_get() has never worked. If ip6addrlbl_hold() succeeded, > ip6addrlbl_get() will exit with '-ESRCH'. If ip6addrlbl_hold() failed, > ip6addrlbl_get() will use about to be free ip6addrlbl_entry pointer. > > Fix this by inverting ip6addrlbl_hold() check. > > Fixes: 2a8cc6c89039 ("[IPV6] ADDRCONF: Support RFC3484 configurable address > selection policy table.") > Signed-off-by: Andrey Ryabinin Applied and queued up for -stable, thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] ipv6/addrlabel: fix ip6addrlbl_get()
Cong Wang wrote: > On Mon, Dec 21, 2015 at 1:54 AM, Andrey Ryabinin > wrote: >> ip6addrlbl_get() has never worked. If ip6addrlbl_hold() succeeded, >> ip6addrlbl_get() will exit with '-ESRCH'. If ip6addrlbl_hold() failed, >> ip6addrlbl_get() will use about to be free ip6addrlbl_entry pointer. >> >> Fix this by inverting ip6addrlbl_hold() check. >> >> Fixes: 2a8cc6c89039 ("[IPV6] ADDRCONF: Support RFC3484 configurable address >> selection policy table.") >> Signed-off-by: Andrey Ryabinin > > Good catch! > > Reviewed-by: Cong Wang Acked-by: YOSHIFUJI Hideaki -- Hideaki Yoshifuji Technical Division, MIRACLE LINUX CORPORATION -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] ipv6/addrlabel: fix ip6addrlbl_get()
From: Andrey RyabininDate: Mon, 21 Dec 2015 12:54:45 +0300 > ip6addrlbl_get() has never worked. If ip6addrlbl_hold() succeeded, > ip6addrlbl_get() will exit with '-ESRCH'. If ip6addrlbl_hold() failed, > ip6addrlbl_get() will use about to be free ip6addrlbl_entry pointer. > > Fix this by inverting ip6addrlbl_hold() check. > > Fixes: 2a8cc6c89039 ("[IPV6] ADDRCONF: Support RFC3484 configurable address > selection policy table.") > Signed-off-by: Andrey Ryabinin Applied and queued up for -stable, thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] ipv6/addrlabel: fix ip6addrlbl_get()
Cong Wang wrote: > On Mon, Dec 21, 2015 at 1:54 AM, Andrey Ryabinin >wrote: >> ip6addrlbl_get() has never worked. If ip6addrlbl_hold() succeeded, >> ip6addrlbl_get() will exit with '-ESRCH'. If ip6addrlbl_hold() failed, >> ip6addrlbl_get() will use about to be free ip6addrlbl_entry pointer. >> >> Fix this by inverting ip6addrlbl_hold() check. >> >> Fixes: 2a8cc6c89039 ("[IPV6] ADDRCONF: Support RFC3484 configurable address >> selection policy table.") >> Signed-off-by: Andrey Ryabinin > > Good catch! > > Reviewed-by: Cong Wang Acked-by: YOSHIFUJI Hideaki -- Hideaki Yoshifuji Technical Division, MIRACLE LINUX CORPORATION -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] ipv6/addrlabel: fix ip6addrlbl_get()
On Mon, Dec 21, 2015 at 1:54 AM, Andrey Ryabinin wrote: > ip6addrlbl_get() has never worked. If ip6addrlbl_hold() succeeded, > ip6addrlbl_get() will exit with '-ESRCH'. If ip6addrlbl_hold() failed, > ip6addrlbl_get() will use about to be free ip6addrlbl_entry pointer. > > Fix this by inverting ip6addrlbl_hold() check. > > Fixes: 2a8cc6c89039 ("[IPV6] ADDRCONF: Support RFC3484 configurable address > selection policy table.") > Signed-off-by: Andrey Ryabinin Good catch! Reviewed-by: Cong Wang -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] ipv6/addrlabel: fix ip6addrlbl_get()
ip6addrlbl_get() has never worked. If ip6addrlbl_hold() succeeded, ip6addrlbl_get() will exit with '-ESRCH'. If ip6addrlbl_hold() failed, ip6addrlbl_get() will use about to be free ip6addrlbl_entry pointer. Fix this by inverting ip6addrlbl_hold() check. Fixes: 2a8cc6c89039 ("[IPV6] ADDRCONF: Support RFC3484 configurable address selection policy table.") Signed-off-by: Andrey Ryabinin --- net/ipv6/addrlabel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv6/addrlabel.c b/net/ipv6/addrlabel.c index 882124e..a8f6986 100644 --- a/net/ipv6/addrlabel.c +++ b/net/ipv6/addrlabel.c @@ -552,7 +552,7 @@ static int ip6addrlbl_get(struct sk_buff *in_skb, struct nlmsghdr *nlh) rcu_read_lock(); p = __ipv6_addr_label(net, addr, ipv6_addr_type(addr), ifal->ifal_index); - if (p && ip6addrlbl_hold(p)) + if (p && !ip6addrlbl_hold(p)) p = NULL; lseq = ip6addrlbl_table.seq; rcu_read_unlock(); -- 2.4.10 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] ipv6/addrlabel: fix ip6addrlbl_get()
On Mon, Dec 21, 2015 at 1:54 AM, Andrey Ryabininwrote: > ip6addrlbl_get() has never worked. If ip6addrlbl_hold() succeeded, > ip6addrlbl_get() will exit with '-ESRCH'. If ip6addrlbl_hold() failed, > ip6addrlbl_get() will use about to be free ip6addrlbl_entry pointer. > > Fix this by inverting ip6addrlbl_hold() check. > > Fixes: 2a8cc6c89039 ("[IPV6] ADDRCONF: Support RFC3484 configurable address > selection policy table.") > Signed-off-by: Andrey Ryabinin Good catch! Reviewed-by: Cong Wang -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH] ipv6/addrlabel: fix ip6addrlbl_get()
ip6addrlbl_get() has never worked. If ip6addrlbl_hold() succeeded, ip6addrlbl_get() will exit with '-ESRCH'. If ip6addrlbl_hold() failed, ip6addrlbl_get() will use about to be free ip6addrlbl_entry pointer. Fix this by inverting ip6addrlbl_hold() check. Fixes: 2a8cc6c89039 ("[IPV6] ADDRCONF: Support RFC3484 configurable address selection policy table.") Signed-off-by: Andrey Ryabinin--- net/ipv6/addrlabel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv6/addrlabel.c b/net/ipv6/addrlabel.c index 882124e..a8f6986 100644 --- a/net/ipv6/addrlabel.c +++ b/net/ipv6/addrlabel.c @@ -552,7 +552,7 @@ static int ip6addrlbl_get(struct sk_buff *in_skb, struct nlmsghdr *nlh) rcu_read_lock(); p = __ipv6_addr_label(net, addr, ipv6_addr_type(addr), ifal->ifal_index); - if (p && ip6addrlbl_hold(p)) + if (p && !ip6addrlbl_hold(p)) p = NULL; lseq = ip6addrlbl_table.seq; rcu_read_unlock(); -- 2.4.10 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/