From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cong Wang Subject: Re: [PATCH net] ipv6: Fix cleanup ordering on inet6_init() error path Date: Sat, 13 Jan 2018 09:39:23 -0800 Message-ID: References: <20180109182116.olzb5rroeazq4ufv@xylophone.i.decadent.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: Linux Kernel Network Developers , Andrey Konovalov To: Ben Hutchings Return-path: Received: from mail-pl0-f42.google.com ([209.85.160.42]:46119 "EHLO mail-pl0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752760AbeAMRjo (ORCPT ); Sat, 13 Jan 2018 12:39:44 -0500 Received: by mail-pl0-f42.google.com with SMTP id 66so924078plc.13 for ; Sat, 13 Jan 2018 09:39:44 -0800 (PST) In-Reply-To: <20180109182116.olzb5rroeazq4ufv@xylophone.i.decadent.org.uk> Sender: netdev-owner@vger.kernel.org List-ID: On Tue, Jan 9, 2018 at 10:21 AM, Ben Hutchings wrote: > Commit 15e668070a64 reordered the initialisation in inet6_init() to > fix a crash on an error path further down the call stack. It also > reordered cleanup on the error path in inet6_init(), but the result > is not the reverse of the initialisation order. This presumably > can result in a resource leak or crash in some error cases. Reorder > cleanup again to fix this. > > Fixes: 15e668070a64 ("ipv6: reorder icmpv6_init() and ip6_mr_init()") > Signed-off-by: Ben Hutchings Acked-by: Cong Wang