Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp26494527rwd; Mon, 3 Jul 2023 10:24:12 -0700 (PDT) X-Google-Smtp-Source: APBJJlHM69T4Fc2mGguMLZ32qJ+h1lFoxQRKAlL63ncTKmbN0Kw25S6BdIEWJjoyglDf2TF06J2p X-Received: by 2002:a17:902:da92:b0:1b8:1c1b:125a with SMTP id j18-20020a170902da9200b001b81c1b125amr9736812plx.2.1688405051742; Mon, 03 Jul 2023 10:24:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688405051; cv=none; d=google.com; s=arc-20160816; b=1Gtnyj1VAHBWD1+TbkWl9Tq2SIZuw3jIhAh9fnPFtXlrH+Pf1UgoVg09r4zmENBPPW rK+2WWe5Z4cx8ovTHakGaCNK7jOsEmaT0xwuKhAE3HyXLF5hUSr4SIG9Tg+0qUWF+Eqr wWDk7f79QxHwitNIw7GfthwOk0qYnaubAJeo/Mq6AnDfiff19wKt+I1tKb9dUBjtF1w1 9jJHRLbNP1q6ZEiardzb6N4HMRwrpIOcQ7nKmg/ajEfFbT+jTd/cqoc3z+icAxi4dm+h pIsiuAJlYza67UQk8uQQh8rqQgOcDkyxRLT1qxjjEs4SykGzbC1/pg3NmeUabG/TZPBT QmeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=5YdKUgtYJMJrIMJYs9dXkGEz/jJa8FAqhLNPLHC6AiI=; fh=AxTH81GmmYuvW3cHeWSJ366smwFBiKEMv/+P3R8w6+A=; b=gk/1JnnJSL5uyB2+8C30LpA+nNAKjzloFOajeqRIstwn8OVihIT9MMNTTkC3N/8pSX e1cl96teje0aWO/tVEVDXmzIppihOAgwyVlMq8vLFdnHVR7l3ch40ZvDqa0VtuRlil7u jHuwcwPqtxx0bhLTZVB/LDEhd3oGzAULpMUgxdunF6u09R0U9IYFXUy6+Pwhvl3CvsWO SqdPRwEzQqO1yFDp4ljYz70ah/euAbYxuNlSAr/Hx08VEDTOS5Wvi+l/OYBYsYi3TknK QhfljOSeM+OB4WG38Rj02HkyuZdT4i35Pe+2JxV01ylaAzHSX/qfRF1CVQ9mmu72wiW/ nU5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=gy1Or7k7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u7-20020a170903124700b001b045d65aedsi19530856plh.228.2023.07.03.10.23.58; Mon, 03 Jul 2023 10:24:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=gy1Or7k7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229504AbjGCRFx (ORCPT + 99 others); Mon, 3 Jul 2023 13:05:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229535AbjGCRFv (ORCPT ); Mon, 3 Jul 2023 13:05:51 -0400 Received: from mail-pl1-x633.google.com (mail-pl1-x633.google.com [IPv6:2607:f8b0:4864:20::633]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2EA9E59 for ; Mon, 3 Jul 2023 10:05:50 -0700 (PDT) Received: by mail-pl1-x633.google.com with SMTP id d9443c01a7336-1b89bc52cd1so4376675ad.1 for ; Mon, 03 Jul 2023 10:05:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688403950; x=1690995950; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=5YdKUgtYJMJrIMJYs9dXkGEz/jJa8FAqhLNPLHC6AiI=; b=gy1Or7k76ULxRye1QzJQRLzXBvn3UzqZ0dYITMQ8wPS5hp+E4sLRxw1hzflUpAEkkV i+DKhxmT4um90J3HcPIsDo/5GoZ4bnCcawTYJoSSb6aGOKkY5agM+nD/T+S7kYki71iX SqIDnCuQ9i0qfmuuBHdy6XFN6a4Xzf3VAcZYmokbrP+SWwScIWlZw/02tyIDmIheAR9q 8mUFKZ2/bUlkRbDMz4t5QqFwYssNgrar/KkM+Xcwky+QCoke+dtxkvNkUTk4RoZMLI5R dCdbMU2WFnT9cuIdK4ObvCHHvHW1pKqperWPww52sH9RPNTEwculJHraZTwdsw0Otv2z Dw7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688403950; x=1690995950; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5YdKUgtYJMJrIMJYs9dXkGEz/jJa8FAqhLNPLHC6AiI=; b=GtVHC0o3CNPhw20RmSeiErueGqBhpoYa5jbbdvruj0IEi6zBLlLSq3vYPrqrYhcvq6 ktv5tb4KJkL56YIgmL0Kz7hff6ENojH04Gn0Qzrm1O1xteVOxbxc32Hpva5z0wztO+FF rRlrZQNaZr6W0E4uClq7F5T6lcCn1AqbNLy7w/0HqzUknaB7vqJQy3avYkxD2IR4lv0k AQo6ASo+ByGqbxRTagLhrz8iTa6sbQ7UUCjcnFNx+9jrxDv7MjkdVrCE9HS+JGCQcgm2 0bo1cDqkA3Sm0268q8RKFk54xFJw1OkcQ7e3FVOfpifgTEVH6RXxMp7O5OAnFvEFA1Zi tTKQ== X-Gm-Message-State: ABy/qLYnOyFSzeBzAAweDvDvTT/SbsIzRR5aX0TnmyRggTGn9JeCEB+V mhRCeZp8Oe1k+nHWxbeiJV1ilYRt0BGD/9BD3XlG2bDm/kQ= X-Received: by 2002:a17:90b:886:b0:263:1720:f802 with SMTP id bj6-20020a17090b088600b002631720f802mr8813729pjb.30.1688403950226; Mon, 03 Jul 2023 10:05:50 -0700 (PDT) MIME-Version: 1.0 References: <20230703123243.7795-1-duminjie@vivo.com> In-Reply-To: From: Max Filippov Date: Mon, 3 Jul 2023 10:05:39 -0700 Message-ID: Subject: Re: [PATCH v1] arch: free dev before return To: Minjie Du Cc: chris@zankel.net, sfr@canb.auug.org.au, linux-kernel@vger.kernel.org, 11162212@vivo.com, opensource.kernel@vivo.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, FROM_LOCAL_NOVOWEL,HK_RANDOM_ENVFROM,HK_RANDOM_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 3, 2023 at 7:19=E2=80=AFAM Max Filippov wr= ote: > On Mon, Jul 3, 2023 at 5:33=E2=80=AFAM Minjie Du wrot= e: > > > > We fixed a bug where the variable dev > > was not freed before return. > > > > Signed-off-by: Minjie Du > > --- > > arch/xtensa/platforms/iss/network.c | 1 + > > 1 file changed, 1 insertion(+) > > Applied to my xtensa tree with the following commit message: > > xtensa: ISS: fix etherdev leak in error return path > > iss_net_configure frees etherdev in all error return paths except one > where register_netdevice fails. Add missing free_netdev to that path. > After testing it I realized that in that error return path the etherdev is freed by the iss_net_pdev_release callback and that this patch introduces freeing an active timer on that path. I've dropped this patch and committed another one that adds a comment about what's going on at that place. --=20 Thanks. -- Max