From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
edumazet@google.com, andrew+netdev@lunn.ch,
netdev@vger.kernel.org
Cc: Thomas Gleixner <tglx@kernel.org>,
anthony.l.nguyen@intel.com,
Przemek Kitszel <przemyslaw.kitszel@intel.com>,
intel-wired-lan@lists.osuosl.org, Joe Damato <joe@dama.to>,
Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Subject: [PATCH net v2 09/12] i40e: Fix preempt count leak in napi poll tracepoint
Date: Wed, 25 Feb 2026 13:15:40 -0800 [thread overview]
Message-ID: <20260225211546.1949260-10-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20260225211546.1949260-1-anthony.l.nguyen@intel.com>
From: Thomas Gleixner <tglx@kernel.org>
Using get_cpu() in the tracepoint assignment causes an obvious preempt
count leak because nothing invokes put_cpu() to undo it:
softirq: huh, entered softirq 3 NET_RX with preempt_count 00000100, exited with 00000101?
This clearly has seen a lot of testing in the last 3+ years...
Use smp_processor_id() instead.
Fixes: 6d4d584a7ea8 ("i40e: Add i40e_napi_poll tracepoint")
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Cc: Tony Nguyen <anthony.l.nguyen@intel.com>
Cc: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Cc: intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org
Reviewed-by: Joe Damato <joe@dama.to>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_trace.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_trace.h b/drivers/net/ethernet/intel/i40e/i40e_trace.h
index 759f3d1c4c8f..dde0ccd789ed 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_trace.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_trace.h
@@ -88,7 +88,7 @@ TRACE_EVENT(i40e_napi_poll,
__entry->rx_clean_complete = rx_clean_complete;
__entry->tx_clean_complete = tx_clean_complete;
__entry->irq_num = q->irq_num;
- __entry->curr_cpu = get_cpu();
+ __entry->curr_cpu = smp_processor_id();
__assign_str(qname);
__assign_str(dev_name);
__assign_bitmask(irq_affinity, cpumask_bits(&q->affinity_mask),
--
2.47.1
next prev parent reply other threads:[~2026-02-25 21:15 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-25 21:15 [PATCH net v2 00/12][pull request] Intel Wired LAN Driver Updates 2026-02-19 (idpf, ice, i40e, ixgbevf, e1000e) Tony Nguyen
2026-02-25 21:15 ` [PATCH net v2 01/12] idpf: increment completion queue next_to_clean in sw marker wait routine Tony Nguyen
2026-02-25 21:15 ` [PATCH net v2 02/12] idpf: skip deallocating bufq_sets from rx_qgrp if it is NULL Tony Nguyen
2026-02-27 3:56 ` [net,v2,02/12] " Jakub Kicinski
2026-03-02 22:02 ` Hay, Joshua A
2026-02-25 21:15 ` [PATCH net v2 03/12] idpf: skip deallocating txq group's txqs " Tony Nguyen
2026-02-25 21:15 ` [PATCH net v2 04/12] idpf: nullify pointers after they are freed Tony Nguyen
2026-02-25 21:15 ` [PATCH net v2 05/12] idpf: change IRQ naming to match netdev and ethtool queue numbering Tony Nguyen
2026-02-25 21:15 ` [PATCH net v2 06/12] idpf: Fix flow rule delete failure due to invalid validation Tony Nguyen
2026-02-25 21:15 ` [PATCH net v2 07/12] ice: recap the VSI and QoS info after rebuild Tony Nguyen
2026-02-25 21:15 ` [PATCH net v2 08/12] ice: fix crash in ethtool offline loopback test Tony Nguyen
2026-02-25 21:15 ` Tony Nguyen [this message]
2026-02-25 21:15 ` [PATCH net v2 10/12] ixgbevf: fix link setup issue Tony Nguyen
2026-02-25 21:15 ` [PATCH net v2 11/12] e1000e: introduce new board type for Panther Lake PCH Tony Nguyen
2026-02-25 21:15 ` [PATCH net v2 12/12] e1000e: clear DPG_EN after reset to avoid autonomous power-gating Tony Nguyen
2026-02-28 16:50 ` [PATCH net v2 00/12][pull request] Intel Wired LAN Driver Updates 2026-02-19 (idpf, ice, i40e, ixgbevf, e1000e) patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260225211546.1949260-10-anthony.l.nguyen@intel.com \
--to=anthony.l.nguyen@intel.com \
--cc=aleksandr.loktionov@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=joe@dama.to \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=tglx@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox