From mboxrd@z Thu Jan 1 00:00:00 1970 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 03CADC7EE25 for ; Fri, 9 Jun 2023 08:22:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240620AbjFIIWr (ORCPT ); Fri, 9 Jun 2023 04:22:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240611AbjFIIW2 (ORCPT ); Fri, 9 Jun 2023 04:22:28 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E0C449DD for ; Fri, 9 Jun 2023 01:21:16 -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 7DCE26548C for ; Fri, 9 Jun 2023 08:20:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 90DBFC4339E; Fri, 9 Jun 2023 08:20:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1686298816; bh=VxCYzCNheFhxwbcito8zCahguC7+OOG81bcx4RDH0n8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UMSlD+kI46qFVPuM9evZAB+r3WUFthxo28+VK+sIKMTO3fKBSP1GN/zbZCvea1os9 xaWLR4Cktcl5o2d+/izd1fGVL47CDt2LmevkZkHJHtc+l7COJCX04Z9DDr3cu+fjvQ u1CUNn2V0kulFBIy66Jorw1CckY6CPioig/Qt9aE= Date: Fri, 9 Jun 2023 10:20:14 +0200 From: Greg KH To: Dmitry Antipov Cc: Michael Jamet , linux-usb@vger.kernel.org, lvc-project@linuxtesting.org Subject: Re: [PATCH] thunderbolt: handle possible NULL pointer from get_device() Message-ID: <2023060939-undead-nuptials-3fc1@gregkh> References: <20230609061619.57756-1-dmantipov@yandex.ru> <2023060911-expose-unplanned-964a@gregkh> <2023060903-unashamed-proactive-8bc9@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On Fri, Jun 09, 2023 at 11:05:59AM +0300, Dmitry Antipov wrote: > On 6/9/23 10:46, Greg KH wrote: > > > Again, how did you test this? > > Did you look at the patch header? For that particular case, the static > analysis tool complains that the value returned by get_device() is most > likely should be checked just because it is checked on a lot of other > code paths. Usually it may be a good precaution to handle the very rare > and unexpected errors; again, if you're sure that this is not the case, > just disregard it. Just because a static tool said "this might be wrong" does not mean you do not need to actually test your change or do some work to verify that it is a sane change at all. So far I have seen more and more false-positives from this "tool" of your group that I am very inclined to just tell all kernel maintainers to ignore them for a very long time as you are not following the documented rules for such patches as outlined in Documentation/process/researcher-guidelines.rst Please read that and fix your tool, and your submission process, I've said this many times already. greg k-h