From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1E7DC004C0 for ; Mon, 23 Oct 2023 11:43:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234384AbjJWLn1 (ORCPT ); Mon, 23 Oct 2023 07:43:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234395AbjJWLnR (ORCPT ); Mon, 23 Oct 2023 07:43:17 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F6C4170C for ; Mon, 23 Oct 2023 04:43:11 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE691C433C7; Mon, 23 Oct 2023 11:43:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1698061391; bh=54envUzWuJLxbv7LNYx8cZ0x9HIPkEgN8cduhtBPPSE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NzW4hI3Boewq/TNC6gr0DtYXUKvPTxJ75xbrrb2yEwyEhRXLAyvUVQ+O1+Deqkxbg kl8yoW0OR5EjUmAh6DvHohdc4/qlsIPYRLc/14ZxSzONcuARkGW94+Yk3fez823zpK QhcYWLxatzPS5N5ChvnsmIAoeU/Fr2wpjVRd81y8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?Maciej=20=C5=BBenczykowski?= , Lorenzo Colitti , David Ahern , Simon Horman , Patrick Rohr , Leon Romanovsky , "David S. Miller" Subject: [PATCH 5.10 031/202] net: release reference to inet6_dev pointer Date: Mon, 23 Oct 2023 12:55:38 +0200 Message-ID: <20231023104827.509183884@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231023104826.569169691@linuxfoundation.org> References: <20231023104826.569169691@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Patrick Rohr commit 5cb249686e67dbef3ffe53887fa725eefc5a7144 upstream. addrconf_prefix_rcv returned early without releasing the inet6_dev pointer when the PIO lifetime is less than accept_ra_min_lft. Fixes: 5027d54a9c30 ("net: change accept_ra_min_rtr_lft to affect all RA lifetimes") Cc: Maciej Żenczykowski Cc: Lorenzo Colitti Cc: David Ahern Cc: Simon Horman Reviewed-by: Simon Horman Reviewed-by: Maciej Żenczykowski Signed-off-by: Patrick Rohr Reviewed-by: Leon Romanovsky Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/ipv6/addrconf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -2727,7 +2727,7 @@ void addrconf_prefix_rcv(struct net_devi } if (valid_lft != 0 && valid_lft < in6_dev->cnf.accept_ra_min_lft) - return; + goto put; /* * Two things going on here: