Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751820AbbLUThk (ORCPT ); Mon, 21 Dec 2015 14:37:40 -0500 Received: from mail-yk0-f179.google.com ([209.85.160.179]:34832 "EHLO mail-yk0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751436AbbLUThi (ORCPT ); Mon, 21 Dec 2015 14:37:38 -0500 MIME-Version: 1.0 In-Reply-To: <1450691685-29413-1-git-send-email-aryabinin@virtuozzo.com> References: <1450691685-29413-1-git-send-email-aryabinin@virtuozzo.com> Date: Mon, 21 Dec 2015 11:37:38 -0800 Message-ID: Subject: Re: [PATCH] ipv6/addrlabel: fix ip6addrlbl_get() From: Cong Wang To: Andrey Ryabinin Cc: "David S. Miller" , Alexey Kuznetsov , James Morris , Hideaki YOSHIFUJI , Patrick McHardy , netdev , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 818 Lines: 19 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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/