From nobody Wed Dec 17 16:09:34 2025 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 71852C7112B for ; Fri, 18 Aug 2023 09:15:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358976AbjHRJOu (ORCPT ); Fri, 18 Aug 2023 05:14:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359024AbjHRJOj (ORCPT ); Fri, 18 Aug 2023 05:14:39 -0400 Received: from out30-97.freemail.mail.aliyun.com (out30-97.freemail.mail.aliyun.com [115.124.30.97]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FF6A30E6 for ; Fri, 18 Aug 2023 02:14:37 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046059;MF=mengferry@linux.alibaba.com;NM=1;PH=DS;RN=3;SR=0;TI=SMTPD_---0Vq1xfH1_1692350071; Received: from j66c13357.sqa.eu95.tbsite.net(mailfrom:mengferry@linux.alibaba.com fp:SMTPD_---0Vq1xfH1_1692350071) by smtp.aliyun-inc.com; Fri, 18 Aug 2023 17:14:35 +0800 From: Ferry Meng To: Christoph Hellwig Cc: LKML , Ferry Meng Subject: [PATCH] freevxfs: fix potential double brelse Date: Fri, 18 Aug 2023 17:14:23 +0800 Message-Id: <20230818091423.97536-1-mengferry@linux.alibaba.com> X-Mailer: git-send-email 2.19.1.6.gb485710b MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Fix smatch warning: fs/freevxfs/vxfs_bmap.c:170 vxfs_bmap_indir() warn: passing freed memory 'bp' Signed-off-by: Ferry Meng diff --git a/fs/freevxfs/vxfs_bmap.c b/fs/freevxfs/vxfs_bmap.c index de2a5bccb930..e2e143f182e1 100644 --- a/fs/freevxfs/vxfs_bmap.c +++ b/fs/freevxfs/vxfs_bmap.c @@ -126,6 +126,7 @@ vxfs_bmap_indir(struct inode *ip, long indir, int size,= long block) =20 if (block < off) { brelse(bp); + bp =3D NULL; continue; } =20 @@ -162,6 +163,7 @@ vxfs_bmap_indir(struct inode *ip, long indir, int size,= long block) BUG(); } brelse(bp); + bp =3D NULL; } =20 fail: --=20 2.19.1.6.gb485710b