Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp318844iog; Thu, 30 Jun 2022 01:08:52 -0700 (PDT) X-Google-Smtp-Source: AGRyM1u4IUDgBSRjsXOEpVvTshVviI7zIPJFmi/gLPgvb8d/euwMfa7raWg5HjQp2rpyk4yx1fpz X-Received: by 2002:a17:90b:d81:b0:1ef:25b6:5ec7 with SMTP id bg1-20020a17090b0d8100b001ef25b65ec7mr6983236pjb.110.1656576532516; Thu, 30 Jun 2022 01:08:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656576532; cv=none; d=google.com; s=arc-20160816; b=V7j5fDMpriuxXYsOlzZvvKwCTlYr+V03mKJb6Up2pP6sTrdo+j7gA4McDdf5wGVJqL YiEkjgkOQVlK2hjf8Ff9egh/us5PnKhqC2HY/XyaisH/9gH4msDccAFz3hhjH5TVB6Ri pT7uFoXJSNo+fnKB54ChW1M7C3I7DHpLWO+v4PEgp5NPnY/wmqr5xAU1xVFq/44qGwBo KywezWF/wHjkfd5H9N5J6S9m7NnqRE6XfPHx/ZR6S14wrViOEW2YjxYfpw9UcTH5C7Bj rWRl1TKODHtoUOyuhdir1zIWaZC821XMp1QcFM+vZk6025Nk2Omyi0/qijcVp32qVgI3 IX5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=72u2GnSkIAdhGkvBg11Npdxrc5n1APg2Nt2Kh+pnGrw=; b=Fy4nX42Ly3MiW2dvVLfCm6xecXvy8MSx6WFYta9DIw6clQjBEyk5ytk5aAUFUtquuA 8ECvtnM7PCwT6YsDksyjwf/LazE7ieJUq99NrUKopjCM7pUC2l7tgUPhi6ytW51C+H2y MNrOCEIRNbEjSlEggwE1k3xuLYGP9Zwmgv+7LwMM7cO2riEJ6kMnSOky6GhxuzUTqE+u 6qQiy5AVPRlYp3nDE9OX5mcIhN3zSRqmoNe8P0YMJyVv2xrioUGHBsG8xDYDQ7ZaYSM5 Xd4CVdWbQKc1ssHkcksyJcPqESocHMqX3OB9wJK05UiSe8Ml+ee+bNI7BZwAJviV1VaS UKyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PYdKbHro; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f1-20020a655901000000b0040ddac45a30si2552345pgu.851.2022.06.30.01.08.40; Thu, 30 Jun 2022 01:08:52 -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=@linuxfoundation.org header.s=korg header.b=PYdKbHro; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232110AbiF3H2N (ORCPT + 99 others); Thu, 30 Jun 2022 03:28:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230402AbiF3H2L (ORCPT ); Thu, 30 Jun 2022 03:28:11 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0CF6FD2E for ; Thu, 30 Jun 2022 00:28:09 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 491B561206 for ; Thu, 30 Jun 2022 07:28:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4D3A1C34115; Thu, 30 Jun 2022 07:28:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656574088; bh=pH/xoO4PIubE9L5cyy2MmAuYYPk1Vk6KDxujHpTzHis=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PYdKbHrok1mxhBGc71fcOwRPfRdDNuEEy7hNAPhyKw7g/zRTpw1TcZc1ODjaH32xs 4G4Qi2u02v4jXei9NWBnI/l+rP092u9PWxX/9mYhSLt3qEPi0UKxXEv7DjaASs7IX0 GUiBs9puYxCWSmWdP8DlrN4s0kwwabJ+d36HsKTk= Date: Thu, 30 Jun 2022 09:28:06 +0200 From: Greg KH To: zys.zljxml@gmail.com Cc: tj@kernel.org, viro@zeniv.linux.org.uk, linux-kernel@vger.kernel.org, katrinzhou Subject: Re: [PATCH] kernfs: fix potential NULL dereference in __kernfs_remove Message-ID: References: <20220630040047.3241781-1-zys.zljxml@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220630040047.3241781-1-zys.zljxml@gmail.com> X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, 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 Thu, Jun 30, 2022 at 12:00:47PM +0800, zys.zljxml@gmail.com wrote: > From: katrinzhou > > When lockdep is enabled, lockdep_assert_held_write would > cause potential NULL pointer dereference. > > Fix the folloeing smatch warnings: > > fs/kernfs/dir.c:1353 __kernfs_remove() warn: variable dereferenced before check 'kn' (see line 1346) > > Signed-off-by: katrinzhou Can you please submit this with your legal name that you use to sign documents? Also, what commit id does this fix? Did you actually hit this with a real workload? How can this be reproduced and tested? thanks, greg k-h