Re: [PATCH] ipv6/addrlabel: fix ip6addrlbl_get()

From: YOSHIFUJI Hideaki
Date: Tue Dec 22 2015 - 03:04:35 EST


Cong Wang wrote:
> On Mon, Dec 21, 2015 at 1:54 AM, Andrey Ryabinin
> <aryabinin@xxxxxxxxxxxxx> 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 <aryabinin@xxxxxxxxxxxxx>
>
> Good catch!
>
> Reviewed-by: Cong Wang <cwang@xxxxxxxxxxxxxxxx>
Acked-by: YOSHIFUJI Hideaki <yoshfuji@xxxxxxxxxxxxxx>

--
Hideaki Yoshifuji <hideaki.yoshifuji@xxxxxxxxxxxxxxxx>
Technical Division, MIRACLE LINUX CORPORATION
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/