Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp147076rdb; Wed, 1 Nov 2023 21:38:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGpw7/k2oiieqvdnrdayLMEdW/s9+GBThyCUosDaOtgZfCThvoobpKRtkNTl603axPvDDlf X-Received: by 2002:a17:902:dac9:b0:1cc:5612:85 with SMTP id q9-20020a170902dac900b001cc56120085mr10588694plx.45.1698899922954; Wed, 01 Nov 2023 21:38:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698899922; cv=none; d=google.com; s=arc-20160816; b=xSfMXdoxmpqPTDEOEePH6galOKAT9MTDzidC5dbPGZz+beyKqFV7t5Y2bBq3s595QT 9ng+6YtxOAhXuI9WV+hbsq0/5/XZx53uFyOY29ixRBmA4Islm16VRLWosje5CWpeYajA sWhIIx4jNhJ7qtgz5v7JHU3Dtowm5EFEROLtojaezdZ+UZpEFZWLAq7RkXEEeyiPsij0 iLJVPrrivO+zKf8B/7toN3ydwcmKU7udPxdFJR4gOslLKOId/QEjplG4U25SlXN51KBD u5RgQgkg8bCfzv8RrgmA3hUcyLQxWfcA9g6dJdwvsj2xQrBu7ORFGSt0KEkQ136pJX9e kOVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=WDloTxWr/boIm4uKFjRhQFd+zFnETCEzhq6OmSzQ97U=; fh=QZ57/91DNY560TOgHJputYiHn1cLJA378/dLS4f+LwI=; b=OIcOqmLpMvKQyjGnjJvfqJ3hPjXPtqcsZ4vYRG3bEX6hVl/BTscH9va0B5DazTwSo0 DCyKDB8I8uay9Pm3nC8qBHeDBWoV4mh0qBFGDH6t01pvDevxrTe0DLXrHcQqaLbewIqI geska6eLttFnBr0mIMQHVE1rITbkcZGPfpfoBqXvi5YIo979PiUfgmblVUpA+qkwsfxx Eanqa7eCvVkHtG8PorxcYJvvoO6rmyS4o+vWEKs6wvaT4UnUtvJWOwWlBf1LQ8hNoTfE IlqWu9/ynWJb15rx/b4Bz2M8V0S0U0jUPHVrRN1Wc6wefVIHwbUsvTuuomcPhwAw1aBE G8NQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pnTtKefv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id q13-20020a170902c74d00b001bb809b68a8si4054781plq.229.2023.11.01.21.38.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 21:38:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pnTtKefv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id D9F6B809B71F; Wed, 1 Nov 2023 21:38:40 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348502AbjKBEih (ORCPT + 99 others); Thu, 2 Nov 2023 00:38:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348268AbjKBEig (ORCPT ); Thu, 2 Nov 2023 00:38:36 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4444DA6 for ; Wed, 1 Nov 2023 21:38:34 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6344BC433C8; Thu, 2 Nov 2023 04:38:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698899913; bh=0AuTmcgzxAIiWFtDkxCVvVBcBp3v8F+NagoSXD+wt40=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=pnTtKefvBCEJADqaRG5dPwiI+9is4rwcSTWQ4e8sBa21wJFhHccesWg8NlIankZnW AZui+UwDszoQCXzOEL7p+6mdvSoD6Q4TqmnZUNe+Hi9R+reVcdxjzRPGxy8K/5SAXU xVrKfDtv/WsWjXpimRPvrFl/vn5xa8Ua32ipv9gdCKgXqqTmAYua8Nn4/t2K6AzxjI 9h2lRptq37Y4yifH1vnZ7GpJYBf+hW6+nc09oxM0RyOrLnfYKCoufqzg9h1EDJ8DJt 57SOAbIidmwFU2VwLAUsJ8BaBQI5ZxaRA/rKJmRv4fYwjoVDFw3lPlGBK4VrBQETBz bf9QCnJdc96Xg== Date: Wed, 1 Nov 2023 21:38:32 -0700 From: Jakub Kicinski To: Ren Mingshuai Cc: , , , , , , , Subject: Re: [PATCH] net: usbnet: Fix potential NULL pointer dereference Message-ID: <20231101213832.77bd657b@kernel.org> In-Reply-To: <20231101125511.222629-1-renmingshuai@huawei.com> References: <20231101123559.210756-1-renmingshuai@huawei.com> <20231101125511.222629-1-renmingshuai@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 01 Nov 2023 21:38:41 -0700 (PDT) On Wed, 1 Nov 2023 20:55:11 +0800 Ren Mingshuai wrote: > >23ba07991dad said SKB can be NULL without describing the triggering > >scenario. Always Check it before dereference to void potential NULL > >pointer dereference. > I've tried to find out the scenarios where SKB is NULL, but failed. > It seems impossible for SKB to be NULL. If SKB can be NULL, please tell > me the reason and I'd be very grateful. What do you mean? Grepping the function name shows call sites with NULL getting passed as skb.