From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796297011; b=JHpjs99HmmOc/xDx0d+Wrko7dtlHOEbWu+YqGfVGx7gRsivUP4MaHDFkc4ZmfyxHN+aZ CTb+qfd34lVVNfbRTJK4PfxYvx7XMWSxXnLXjx3cg9mcr4NXsDY2eKQD+jmHYHMRyjL1m zNrm9ZinqMSCfWUFEIO2cdbqnyONokDFCzPm/hciBbeTIGqHx7cYx09wBGmKDFxFW3n5K qJz3IQvHgA+CAo8UEDn43CjxV/+eHt+a17MBVwPS0mfCCyXwTX6uSt66vzVsI7ohfctlR XH/tehuP6H79Bb4k4xdPu7GzRCzXLJ8K9+Ysg4GFZnM+ayRAr8e5m+e3bHkN3XGq2/g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796297011; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=q+BUpanqjPFm9Tq9Z83camq9K4VMkEs+Vc6OI5cf3l8=; b=FpbN2KjT5VpexgrFe8gdDafNB2rd7uCdL366WS/1Qtc7w2bUYTLDzjaP13GJ9pbQ2dlH 4H/ncig5c1LFxLO0XnChIy5x4ApO6jaLvPrrmK5NTry9pJYVX3BhXtxPs2ddAraEpfmb6 5+kQJ8FfCZDTevLHjFqzN/dxbUEj+SjUeV9W9cf+jDyCgLOyrdSDj6GQOQEC8vpzHp1N0 SkZDDPRTSnYjhmHyfgyjWsdwDGhvPlHJrSNzpJVaTb0rNXnq/Yw72LfdOksyCpyCEV65K A0WEv0BwpS2ffZt4jwcGqp8h9Uz9bP8K4sSQ+ROnSEQLXUXfcxbW9yYatZSv8gDBQ8A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=nkLAhhBN; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 18095606A32F for ; Thu, 3 Dec 2026 11:23:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=nkLAhhBN Received: by smtp.kernel.org (Postfix) with ESMTPSA id AA6A91F00899; Thu, 3 Dec 2026 11:23:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796297010; bh=q+BUpanqjPFm9Tq9Z83camq9K4VMkEs+Vc6OI5cf3l8=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=nkLAhhBN3LP/IbcykEDZxK7s7jnj5naVznwReLTcFccccRfAhJxZY0N9STZUbhCLH 1yXkMZumLq/5yABPN+ndebGD5A+YOy+b0Uto5QphFDowi6g6MBPIj3d0Bng5Qhubar 3TpZzzczx5tryn/sp+d6JxV8OcTQ9JNtKqz15H5txbJfnXAFv5W1vr4Ro8StVklqCo NlU6SUaU60BplBZ+vArcUptbeU2DPTCdN5dgoM1P7OQHCIt5oILeDRSCYUh9g54LZn u3uJIkGxelkjsrONAd8LPq06QHBty48QAyJ9R4kdv/PvYaa9n+8abO3z6HhVonvGUh JcSEzeMaSjcEQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH 1/2] can: vcan: use per-CPU stats to fix KCSAN data-race in vcan_tx Reply-To: sashiko-reviews@lists.linux.dev To: "T S Rameshkumar" Cc: linux-can@vger.kernel.org, "Marc Kleine-Budde" , "Oliver Hartkopp" , "Vincent Mailhol" , "Oleksij Rempel" In-Reply-To: <20261203111103.379929-1-rameshsv06@gmail.com> References: <20261203111103.379929-1-rameshsv06@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 11:23:30 +0000 X-Mailing-List: linux-can@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] can: vcan: redundant ndo_get_stats64 callback with NETDEV_PCPU_STAT_TSTATS -- commit 3a0edae3f5983fb3bb0c7e6ae9f7865bc39dc626 Author: T S Rameshkumar can: vcan: use per-CPU stats to fix KCSAN data-race in vcan_tx This commit converts vcan to use per-CPU statistics via NETDEV_PCPU_STAT_TSTATS and dev_sw_netstats_{rx,tx}_add() instead of plain accesses to dev->stats. > diff --git a/drivers/net/can/vcan.c b/drivers/net/can/vcan.c > index 76e6b7b5c6a11..15ebd814fe75f 100644 > --- a/drivers/net/can/vcan.c > +++ b/drivers/net/can/vcan.c [ ... ] > @@ -161,6 +155,7 @@ static int vcan_change_mtu(struct net_device *dev, in= t new_mtu) > static const struct net_device_ops vcan_netdev_ops =3D { > .ndo_start_xmit =3D vcan_tx, > .ndo_change_mtu =3D vcan_change_mtu, > + .ndo_get_stats64 =3D dev_get_tstats64, > }; [Severity: Low] Can .ndo_get_stats64 =3D dev_get_tstats64 be omitted here? Since commit 3e2f544dd8a3 ("net: get stats64 if device if driver is configured"), dev_get_stats() already calls dev_get_tstats64() directly when dev->pcpu_stat_type is NETDEV_PCPU_STAT_TSTATS (as set in vcan_setup()) and ndo_get_stats64 is unset. Setting .ndo_get_stats64 explicitly takes the ops->ndo_get_stats64 branch in dev_get_stats() instead, adding an unnecessary memset() and indirect call on every stats read before dev_get_tstats64() overwrites storage via netdev_stats_to_stats64(). --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203111103.3799= 29-1-rameshsv06@gmail.com?part=3D1