lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20241203082753.4831-2-przemyslaw.kitszel@intel.com>
Date: Tue,  3 Dec 2024 09:25:33 +0100
From: Przemek Kitszel <przemyslaw.kitszel@...el.com>
To: intel-wired-lan@...ts.osuosl.org,
	Tony Nguyen <anthony.l.nguyen@...el.com>
Cc: netdev@...r.kernel.org,
	Przemek Kitszel <przemyslaw.kitszel@...el.com>,
	Dan Carpenter <dan.carpenter@...aro.org>
Subject: [PATCH iwl-next] fixup! ice: dump ethtool stats and skb by Tx hang devlink health reporter

Dan has reported [1] than @event variable is dereferenced before the check
against NULL, fix that.
[1]: https://lore.kernel.org/intel-wired-lan/b1453276-9043-49c4-a603-9b6bb41306c7@stanley.mountain

Tony please squash this into my devlink-health series (no need to amend
commit message) that is in your dev-queue.
The last version of the whole series was send here:
https://lore.kernel.org/netdev/20240930133724.610512-1-przemyslaw.kitszel@intel.com

CC: Dan Carpenter <dan.carpenter@...aro.org>
Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@...el.com>
---
 drivers/net/ethernet/intel/ice/devlink/health.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/intel/ice/devlink/health.c b/drivers/net/ethernet/intel/ice/devlink/health.c
index c7a8b8c9e1ca..d9b852ccf99e 100644
--- a/drivers/net/ethernet/intel/ice/devlink/health.c
+++ b/drivers/net/ethernet/intel/ice/devlink/health.c
@@ -163,11 +163,10 @@ static int ice_tx_hang_reporter_dump(struct devlink_health_reporter *reporter,
 	struct ice_tx_hang_event *event = priv_ctx;
 	struct sk_buff *skb;
 
-	skb = event->tx_ring->tx_buf->skb;
-
 	if (!event)
 		return 0;
 
+	skb = event->tx_ring->tx_buf->skb;
 	devlink_fmsg_obj_nest_start(fmsg);
 	ICE_DEVLINK_FMSG_PUT_FIELD(fmsg, event, head);
 	ICE_DEVLINK_FMSG_PUT_FIELD(fmsg, event, intr);

base-commit: 9e11d56a825f5e927039c285df38c22c20dcb757
-- 
2.46.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ