Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp797130rdb; Thu, 15 Feb 2024 16:20:05 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVkaw01kQDmyMjFxyUO73/ChBMX1ve0sKF+mz17OadTvOROFSxyZXZ1aHbohf2iSDsvMN3JH/ywEKQRAF77a3pwXkvTwg32RinVdpVIsg== X-Google-Smtp-Source: AGHT+IHsUVVE2kyb0BwCI4gaam75Xvnk8Ditez/OytJ2NUYTjmeGcmxAtJKZbzIkhNjqNjrFiRJM X-Received: by 2002:a05:620a:1650:b0:787:35b4:6bdf with SMTP id c16-20020a05620a165000b0078735b46bdfmr3780669qko.52.1708042690396; Thu, 15 Feb 2024 16:18:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708042690; cv=pass; d=google.com; s=arc-20160816; b=BGBBcOKlMrLo3s6H+Xp5FeeHdsIpzAzjrJZvh06QWTBsRxzE684D8xf1hvIIXagXK1 lkUctM6XCZpeP26Gd/KKsx0X1yKsnAmOqglsGG/lgp1XDo5EklYdDtpwAu2LTqDflOBH KA32scG/ZAcR6Yli0grlzQHuhC7yvshnp3cXGdIcfEzOrAF6CJ6PJyk0IH6oPp8nwijU KY6Sa5ESfr3IBlxqfty0lIyFShOIo9bvv8QvEDda2xrTvkDBfQUq5xYfehs/79Dx8ypR 6L1wQVqJ9MlkOL5xDqYdrh+OacmnYpMhhf9H3QuhgOBI4vBhsHk9fgi13DdYJ53OSv/C E7Bg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=4PbgQsfGQ3x3R7D6HGJW1HkpIAtBaVUF/26+mLivtJw=; fh=vXMggOb5zMHKNRUPMCdsNY7x8g9GQGdrC0TjnDfede4=; b=sZd88iJ1pYE9l8Rthwrtb87r/y6MN0rAvJjipHPERnbo3Zp0xXn16uru7RocETrnCx 1Qf/uzIIiEgzXDPp1P/zU1O1G5jwsmDBgwQdTVYkK6W40z4gduUzntLAqSuDaVE13DwL pEhlppPSXCdCcf0dVF1dXOygWkRpwce4ih8SUzCzjkat3OEP36mEK8v4m75Otuj/cqdU 34qvbjeS/c34uwZx3tsJvtvPcP+0zTRoI7b1FjSxgt3SyK8dAMSFnMhnSU/pLu6HVzpR dpekYhrtA22Qp42RRPySq1zCupk7WgTOhME40wU/sz1jFl669ywtTN3/Yxpydqgc0KIA LjUg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nRVAiIaM; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-67888-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67888-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id b19-20020a05620a0f9300b007872a6a51b4si2675673qkn.132.2024.02.15.16.18.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 16:18:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-67888-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nRVAiIaM; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-67888-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-67888-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 2B27D1C23A5A for ; Fri, 16 Feb 2024 00:18:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7C96646A0; Fri, 16 Feb 2024 00:18:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="nRVAiIaM" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 99C9628F1; Fri, 16 Feb 2024 00:18:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708042684; cv=none; b=Y+aOZ0dS0SliFQ4/tO85fMcbvoyfJ1p7QZohRf3/prvClhlR+NZlGGNAnisMZ0o+XRbT6GpYxQooXX+q3UhrDTx1f5is5IhbTnR7DM95AYzE32GgWtCoJW6lIfo8nofXbmugSDrOC5QeuOCwiXQUk36ECGOOVZiutDzMPWzv0F8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708042684; c=relaxed/simple; bh=4PbgQsfGQ3x3R7D6HGJW1HkpIAtBaVUF/26+mLivtJw=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=X+QfkdvjySatCw9FZdc081cjUpFm39wDVqqNvtH98rfFgLNwzG/EqQP3rcg2d1bQAxDDEdfAfRndKeFllIGADPrZRY7k+PkNUfKU2JF5cXlOSdHSGq51JABf4tUPTClcKSgznnkki29UT54sa8KOYIFe0RIMTKUOP3SQLYnrY58= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=nRVAiIaM; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C5477C433C7; Fri, 16 Feb 2024 00:18:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708042684; bh=4PbgQsfGQ3x3R7D6HGJW1HkpIAtBaVUF/26+mLivtJw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=nRVAiIaM0fl19nBK+PivSO4b9I0/DsU1tb56IZkDp3wFnNNFjbTuE6fk3QlKjWCY7 7OII8D0Vhn5Vqa2HGcQHnvznDrzNGJxTchQtTkO7gpQIRLI7uJjnw8J+EZG8juLLBo cRD7IzpBCNPwYH4wAOOS02RxE1lVWlHa6zahuD1PO6K+DSHcRvsm/MshUAqoXX1aa1 rGqvc0EdIZ3FMHoyDXFT6xBBXwkaTarDB0s2X8xm9WV+vCT8zwnqtIStZkId7FFpIg x/P90r6wR5Nd6A3IOPI/252STNJVRaqTXDRWi/iS48/CFVR+4T4qA4eAYnzSHLORyo st2J7UtkRaklA== Date: Thu, 15 Feb 2024 16:18:02 -0800 From: Jakub Kicinski To: Rand Deeb Cc: "David S . Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, deeb.rand@confident.ru, lvc-project@linuxtesting.org, voskresenski.stanislav@confident.ru Subject: Re: [PATCH] dl2k: Fix potential NULL pointer dereference in receive_packet() Message-ID: <20240215161802.73c0ece3@kernel.org> In-Reply-To: References: <20240213200900.41722-1-rand.sec96@gmail.com> <20240214170203.5bf20e2d@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 16 Feb 2024 02:32:54 +0300 Rand Deeb wrote: > Regarding your comment on using `(!skb)` instead of `(skb == NULL)`, I > understand that `(!skb)` is more common and is also recommended by ` > checkpatch.pl`. However, I chose to keep the original code style and logic > to maintain consistency and avoid confusion, especially for other > developers who might be familiar with the existing format. The same > applies to the `printk` statement. In the same function, there is an exact > block of code used; should I fix it too? Don't worry about surrounding code if it's written in a clearly outdated style. If the style is different intentionally, that's different, but for old code using more modern style helps bring the code base forward little by little.