From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by gnuweeb.org (Postfix) with ESMTPS id 4C29F7E24B for ; Mon, 1 Aug 2022 14:40:54 +0000 (UTC) Authentication-Results: gnuweeb.org; dkim=pass (2048-bit key; unprotected) header.d=resnulli-us.20210112.gappssmtp.com header.i=@resnulli-us.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=ln9Otoqf; dkim-atps=neutral Received: by mail-wr1-f47.google.com with SMTP id l4so14407160wrm.13 for ; Mon, 01 Aug 2022 07:40:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=14KOQn3U09Etizd1SZ3pc5DfY9+tF9zMxWV58jSuGuE=; b=ln9Otoqf4wEoVRIgdfZr95riVXGLZq63ykvOyiv+nRsT6MXy2pw0qlNiHv/wkKg8VR qy6rgo5S0kRmVSJSI8oHq+/TK9IDHrzOdBpMh7NoQseDYEygb5jCpitEs5/YbUvxtYl9 Wdl7/jFbSDXmtqsBIlqeKGrOnRmp/MS2sN9mbbe2UDX19rieQ9Eq9czDezqyITQaZrBu OGG13Y1dXSdGcYKkB4UfByrAaFXUic4Wv1k5L/4kyGvWKa/Bl+SpabJDRHId0rlL7zcR hes8/TjC/da/ehnuer1ZmnPG7I8QC2wan9ylugRQoiQEV7Z1cDYYnlFylLmUiohQKlh7 zfHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=14KOQn3U09Etizd1SZ3pc5DfY9+tF9zMxWV58jSuGuE=; b=4s9ITP7OaIkGFkkvhCMP1LyC+0RxuzWxmrbDf32QF0JG2LweznFsmSHB7hPLMLZuR2 XxLs5g75+gPUz4NU6w5hYg8TsE4tlq6pzXjLCIoLbCgsTGE2r50H6i++Kmw2b453r3NU jEelRDC8+zM8lsbSqlprbgnEgxaU5b6b6jjW1lBIH1+bck9CpNWNAIIKeNqeXupZRgwa BY0TBN4V5d4jJtX0HNR8mGYbiqUy2EW/X2YByqTKkBUL9EfZpBDPL3neNQgTRxJGGlUW GwqQo8DRqFsvBSSRPr0dkmV5wk8qzveH6F6Lxc9d4pe9T4hXPsAeQBVe34ONPrH0CF2i 86Ag== X-Gm-Message-State: ACgBeo0US8dHIVW+Svw5KeGPIkoIemMF2vFYRtC5htSHgJrkPn0hLz3u iBPq+58aj28FwA0aGUlkfu3DOA== X-Google-Smtp-Source: AA6agR6CLIJddHIFsdoRnEoCimzh2cjJp8NBZ07mvCC7qWBoeICAgZyMqz5vnhXXvm6O7FW3ZXd9ag== X-Received: by 2002:adf:e0cd:0:b0:21f:bb1:21f4 with SMTP id m13-20020adfe0cd000000b0021f0bb121f4mr10665807wri.113.1659364852659; Mon, 01 Aug 2022 07:40:52 -0700 (PDT) Received: from localhost (host-213-179-129-39.customer.m-online.net. [213.179.129.39]) by smtp.gmail.com with ESMTPSA id r21-20020a05600c35d500b003a17ab4e7c8sm20525405wmq.39.2022.08.01.07.40.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Aug 2022 07:40:51 -0700 (PDT) Date: Mon, 1 Aug 2022 16:40:50 +0200 From: Jiri Pirko To: Ammar Faizi Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , kernel test robot , Dan Carpenter , Moshe Shemesh , Jiri Pirko , Fernanda Ma'rouf , netdev Mailing List , GNU/Weeb Mailing List , Linux Kernel Mailing List , kbuild Mailing List , kbuild-all Mailing List Subject: Re: [PATCH] net: devlink: Fix missing mutex_unlock() call Message-ID: References: <202207311503.QBFSGqiL-lkp@intel.com> <20220801115742.1309329-1-ammar.faizi@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220801115742.1309329-1-ammar.faizi@intel.com> List-Id: Mon, Aug 01, 2022 at 01:59:56PM CEST, ammarfaizi2@gnuweeb.org wrote: >From: Ammar Faizi > >Commit 2dec18ad826f forgets to call mutex_unlock() before the function >returns in the error path: > > New smatch warnings: > net/core/devlink.c:6392 devlink_nl_cmd_region_new() warn: inconsistent \ > returns '®ion->snapshot_lock'. > >Make sure we call mutex_unlock() in this error path. > >Reported-by: kernel test robot >Reported-by: Dan Carpenter >Fixes: 2dec18ad826f52658f7781ee995d236cc449b678 ("net: devlink: remove region snapshots list dependency on devlink->lock") >Signed-off-by: Ammar Faizi Reviewed-by: Jiri Pirko Thanks for the fix!