Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp26283655rwd; Mon, 3 Jul 2023 07:44:15 -0700 (PDT) X-Google-Smtp-Source: APBJJlHcuqf8bc9I3UGkhg2eKDF7IFbka+ioRU0AwFmY93bQWaYU+SrVwgzyE9DUoOcJC7hKW541 X-Received: by 2002:a17:90a:1542:b0:25c:1d12:7f9d with SMTP id y2-20020a17090a154200b0025c1d127f9dmr8099958pja.20.1688395455169; Mon, 03 Jul 2023 07:44:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688395455; cv=none; d=google.com; s=arc-20160816; b=VdRipvDOIbQfMY+CRubfjoJsK7iuw5fk7El5ivsZIcKNf/UI1EsQhiolKr+4W4j3CQ bZzluP9Z895xMdBNPuYFd8toJAkWHbaHNCx6VOX/jboM7yBvztSyHAWq0HUTEKQxYpHQ LW9trWVYgxhqlydZUMDjOqGvFYQgzJwWQRPdhQQ3NjKYwxHGyR1bCoO84ioRXhZbXxgm G6HJe+dTble4RZjRr3BlFfijWFPSCPGEAwZkY20FKfJehtyRcK2ZgwNW2iXllQY0qRnv jEdWmvHp1OKBdUb7TvktVynalRHeM/74U5TLwfp5BqBd9BXZZKV4QOj0MP22FENObPhE NDOw== 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=3EnErmhjmWaSfn41HhKA4gTkH21PVtrL/UDLuzw5vo8=; fh=AxTH81GmmYuvW3cHeWSJ366smwFBiKEMv/+P3R8w6+A=; b=vfnnyqnoEYih7jkxIxssdW9k6PyDZEDjh/Ndh09SGr+CRKGl2b5ORTwoTSWW+jkKau ZfAVwX9W98xXPkF4HIsWacEE/DmhuYyA86fnvujj+D4t6stp0NSbhlGz3ZCFM6V9Y269 4K6JI8EAVhZbrwJttwUXClGURCFlsH10VHSYmBcFShrzgnWLLDmUwYcvg29zdYy3f3og V4xVxCmKkACYaJQW4Ys459KvevsIwSZvdcZhJCjMfdCpG8293b1b8YhxXsTfsu6uFXEv JzwKjtxBZEdAaw7MFsJPlp7E2S6pVPjBhlzdflPZzqleLAu9SNjseMn/rPu0tSxC+4eq eVng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=RkVJ3Nhl; 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 ls10-20020a17090b350a00b00262d8c82bddsi18380063pjb.157.2023.07.03.07.44.01; Mon, 03 Jul 2023 07:44:15 -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=RkVJ3Nhl; 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 S230303AbjGCOTu (ORCPT + 99 others); Mon, 3 Jul 2023 10:19:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229888AbjGCOTt (ORCPT ); Mon, 3 Jul 2023 10:19:49 -0400 Received: from mail-ot1-x32e.google.com (mail-ot1-x32e.google.com [IPv6:2607:f8b0:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D84CE5B for ; Mon, 3 Jul 2023 07:19:46 -0700 (PDT) Received: by mail-ot1-x32e.google.com with SMTP id 46e09a7af769-6b7541d885cso3500021a34.3 for ; Mon, 03 Jul 2023 07:19:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688393985; x=1690985985; 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=3EnErmhjmWaSfn41HhKA4gTkH21PVtrL/UDLuzw5vo8=; b=RkVJ3NhlalPsYlTt8MsoPsguViVv6ysJOA3DBja30DI6ECNV/ezxUi/d1/bKx2/UNq E3fnb/CCYgoSQJuuFgdoR4SoLl9JT/VSWhapvhcWGyJaI7XFvgx+qPbp1YeFZ8xoR+mv zG482qbjrlVU4tcicmJqtSVT+uNvhQS1wZBA6MbwthHo7oFtzlsnmOPZAmkcNR47beNN gWzqth8sGlw0FtBawJGnr2DVDHTBxMpNff7iheywB0BAwZu2fWuszPaI9SCLKqyTapSt Tc1ncfEwe2rOog5XbRPvzLsUJRPxI/wLle3ZbslOMuZcsYPVe9u37RCzt9UM5S9I+UsD bbKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688393985; x=1690985985; 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=3EnErmhjmWaSfn41HhKA4gTkH21PVtrL/UDLuzw5vo8=; b=L32Erj8/t92Gq4/XpCAaL35gjR7deXFGK2E6lOu/x6hKpW9X5GpjO2SWqfZcFi6tGT wZU0FFsin6pX5S42ssQkNlX5NmZI0suU0w+70MwxgOEGzhl6UGyw57932qPKktG4dppc BEUY4yl0nrwXTQD1ZUudrOkxdqL64vmlO3uicMOVouwJqyU4835AuweNfjib5DFdG3ab O38kDAL237arB3foRSq/qx/7Ain8Qrpd4ZWxJyYxA17LJNzUSG1KwrpwNGpAFJIuEeXU P4/xhh8yn6slsgcBsCtErM7eOdbZ9+pEhcJYhnam6Xde+SgdDBvptTyshcCHUfKvRYBY Kixg== X-Gm-Message-State: AC+VfDy09CgF9ATz2YIejXUDZPisVo9AKDMHJeJviUolN/wz5D3q/Ekz nhebjyHkvOigjqcU/rHwglac8UIpDQj4IqfzFsV8Jo2sSh4= X-Received: by 2002:a9d:7dcd:0:b0:6b7:558d:579 with SMTP id k13-20020a9d7dcd000000b006b7558d0579mr9261749otn.32.1688393985288; Mon, 03 Jul 2023 07:19:45 -0700 (PDT) MIME-Version: 1.0 References: <20230703123243.7795-1-duminjie@vivo.com> In-Reply-To: <20230703123243.7795-1-duminjie@vivo.com> From: Max Filippov Date: Mon, 3 Jul 2023 07:19:33 -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 Hi Minjie, On Mon, Jul 3, 2023 at 5:33=E2=80=AFAM Minjie Du wrote: > > 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. --=20 Thanks. -- Max