* [PATCH net] ice: Fix page fault on XDP_PASS skb allocation failure
@ 2026-12-02 23:01 Frederick Lawler
2026-12-02 23:05 ` netdev-bot+sinfo
2026-12-02 23:16 ` Keller, Jacob E
0 siblings, 2 replies; 3+ messages in thread
From: Frederick Lawler @ 2026-12-02 23:01 UTC (permalink / raw)
To: Tony Nguyen, Przemek Kitszel, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Alexander Lobakin,
Alexei Starovoitov, Daniel Borkmann, Jesper Dangaard Brouer,
John Fastabend, Stanislav Fomichev, Michal Kubiak, Jacob Keller
Cc: intel-wired-lan, netdev, bpf, kernel-team, stable,
Frederick Lawler
In the XDP_PASS receive path, xdp_build_skb_from_buff() can return
NULL when it cannot allocate an skb head. ICE currently clears
xdp->data before checking for that failure, then passes the buffer to
libeth_xdp_return_buff_slow(). The return helper needs xdp->data to
find and recycle the page-pool buffer, so the NULL pointer can cause
a page fault instead.
Leave xdp->data intact on the failure path so the helper can recycle
the buffer; it clears the pointer afterward. On success, clear the
pointer only after the skb has taken ownership of the buffer.
Observed on a real machine. Patch not yet tested on a real machine.
BUG: unable to handle page fault for address: ffc0e085fa000010
PGD 0
Oops: Oops: 0000 [#1] SMP NOPTI
RIP: 0010:libeth_xdp_return_buff_slow+0x33/0x50 [libeth_xdp]
Code: 53 48 89 fb f6 47 34 01 74 16 8b 47 30 48 8b 57 18 31 f6 48 8d bc 02 c0 fe ff ff e8 d7 fd ff ff 48 8b 3b e8 bf ed ff ff 31 d2 <48> 8b 78 10 48 89 c6 e8 61 fd ff ff 31 c0 48 89 03 5b e9 a1 3e 5b
RSP: 0018:ff80ef514ccb7ba0 EFLAGS: 00010246
RAX: ffc0e085fa000000 RBX: ff80ef514ccb7c20 RCX: 0000000000000000
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000080000000
RBP: ff80ef514ccb7ca0 R08: 0000000000000246 R09: 0000000000000000
R10: ffbe1c5fb6497e01 R11: 0000000000000003 R12: ff4ef6240d34a6a0
R13: 0000000000000000 R14: ff4ef62bd9abe400 R15: 0000000000000536
FS: 0000000000000000(0000) GS:ff4ef629f203f000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffc0e085fa000010 CR3: 00000034082dd004 CR4: 0000000000771ef0
PKRU: 55555554
Call Trace:
<TASK>
ice_napi_poll+0xd6f/0xf10 [ice]
__napi_poll+0xbf/0x200
bpf_trampoline_6442499332+0x79/0x123
__napi_poll+0x5/0x200
net_rx_action+0x325/0x7c0
handle_softirqs+0xd3/0x270
run_ksoftirqd+0x25/0x30
smpboot_thread_fn+0xf3/0x220
kthread+0xfd/0x240
ret_from_fork+0x12e/0x190
ret_from_fork_asm+0x1a/0x30
</TASK>
Fixes: 93f53db9f9dc ("ice: switch to Page Pool")
Cc: stable@vger.kernel.org # 6.18+
Signed-off-by: Frederick Lawler <fred@cloudflare.com>
---
drivers/net/ethernet/intel/ice/ice_txrx.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_txrx.c b/drivers/net/ethernet/intel/ice/ice_txrx.c
index 35a480a1e172..a4b7d772e21e 100644
--- a/drivers/net/ethernet/intel/ice/ice_txrx.c
+++ b/drivers/net/ethernet/intel/ice/ice_txrx.c
@@ -1041,7 +1041,6 @@ static int ice_clean_rx_irq(struct ice_rx_ring *rx_ring, int budget)
construct_skb:
skb = xdp_build_skb_from_buff(&xdp->base);
- xdp->data = NULL;
/* exit if we failed to retrieve a buffer */
if (!skb) {
@@ -1050,6 +1049,8 @@ static int ice_clean_rx_irq(struct ice_rx_ring *rx_ring, int budget)
continue;
}
+ xdp->data = NULL;
+
vlan_tci = ice_get_vlan_tci(rx_desc);
/* probably a little skewed due to removing CRC */
---
base-commit: c1c39137dcc3134010566ff29a81c93124efa539
change-id: 20261202-ice-xdp-fix-upstream-c1c25b0547bd
Best regards,
--
Frederick Lawler <fred@cloudflare.com>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] ice: Fix page fault on XDP_PASS skb allocation failure
2026-12-02 23:01 [PATCH net] ice: Fix page fault on XDP_PASS skb allocation failure Frederick Lawler
@ 2026-12-02 23:05 ` netdev-bot+sinfo
2026-12-02 23:16 ` Keller, Jacob E
1 sibling, 0 replies; 3+ messages in thread
From: netdev-bot+sinfo @ 2026-12-02 23:05 UTC (permalink / raw)
To: Frederick Lawler
Cc: Tony Nguyen, Przemek Kitszel, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Alexander Lobakin,
Alexei Starovoitov, Daniel Borkmann, Jesper Dangaard Brouer,
John Fastabend, Stanislav Fomichev, Michal Kubiak, Jacob Keller,
intel-wired-lan, netdev, bpf, kernel-team, stable
Hi!
This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:
- What hardware the change was tested on. For driver fixes please
mention the device (and if relevant firmware version) used for
testing, or say that the change was not tested on real hardware.
Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account.
*IMPORTANT*: If you do repost (for other reasons) - please include
the relevant info in the cover letter or commit messages.
--
The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH net] ice: Fix page fault on XDP_PASS skb allocation failure
2026-12-02 23:01 [PATCH net] ice: Fix page fault on XDP_PASS skb allocation failure Frederick Lawler
2026-12-02 23:05 ` netdev-bot+sinfo
@ 2026-12-02 23:16 ` Keller, Jacob E
1 sibling, 0 replies; 3+ messages in thread
From: Keller, Jacob E @ 2026-12-02 23:16 UTC (permalink / raw)
To: Frederick Lawler, Nguyen, Anthony L, Kitszel, Przemyslaw,
Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Lobakin, Aleksander, Alexei Starovoitov,
Daniel Borkmann, Jesper Dangaard Brouer, John Fastabend,
Stanislav Fomichev, Michal Kubiak
Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org,
bpf@vger.kernel.org, kernel-team@cloudflare.com,
stable@vger.kernel.org
> -----Original Message-----
> From: Frederick Lawler <fred@cloudflare.com>
> Sent: Wednesday, December 2, 2026 3:02 PM
> To: Nguyen, Anthony L <anthony.l.nguyen@intel.com>; Kitszel, Przemyslaw
> <przemyslaw.kitszel@intel.com>; Andrew Lunn <andrew+netdev@lunn.ch>;
> David S. Miller <davem@davemloft.net>; Eric Dumazet
> <edumazet@kernel.org>; Jakub Kicinski <kuba@kernel.org>; Paolo Abeni
> <pabeni@redhat.com>; Lobakin, Aleksander <aleksander.lobakin@intel.com>;
> Alexei Starovoitov <ast@kernel.org>; Daniel Borkmann
> <daniel@iogearbox.net>; Jesper Dangaard Brouer <hawk@kernel.org>; John
> Fastabend <john.fastabend@gmail.com>; Stanislav Fomichev
> <sdf@fomichev.me>; Michal Kubiak <michal.kubiak@intel.com>; Keller, Jacob
> E <jacob.e.keller@intel.com>
> Cc: intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org;
> bpf@vger.kernel.org; kernel-team@cloudflare.com; stable@vger.kernel.org;
> Frederick Lawler <fred@cloudflare.com>
> Subject: [PATCH net] ice: Fix page fault on XDP_PASS skb allocation failure
>
> In the XDP_PASS receive path, xdp_build_skb_from_buff() can return
> NULL when it cannot allocate an skb head. ICE currently clears
> xdp->data before checking for that failure, then passes the buffer to
> libeth_xdp_return_buff_slow(). The return helper needs xdp->data to
> find and recycle the page-pool buffer, so the NULL pointer can cause
> a page fault instead.
>
> Leave xdp->data intact on the failure path so the helper can recycle
> the buffer; it clears the pointer afterward. On success, clear the
> pointer only after the skb has taken ownership of the buffer.
>
> Observed on a real machine. Patch not yet tested on a real machine.
>
Seems straight forward enough of a fix.
Reviewed-by: Jacob Keller <Jacob.e.keller@intel.com>
> BUG: unable to handle page fault for address: ffc0e085fa000010
> PGD 0
> Oops: Oops: 0000 [#1] SMP NOPTI
> RIP: 0010:libeth_xdp_return_buff_slow+0x33/0x50 [libeth_xdp]
> Code: 53 48 89 fb f6 47 34 01 74 16 8b 47 30 48 8b 57 18 31 f6 48 8d bc 02
> c0 fe ff ff e8 d7 fd ff ff 48 8b 3b e8 bf ed ff ff 31 d2 <48> 8b 78 10 48 89 c6 e8
> 61 fd ff ff 31 c0 48 89 03 5b e9 a1 3e 5b
> RSP: 0018:ff80ef514ccb7ba0 EFLAGS: 00010246
> RAX: ffc0e085fa000000 RBX: ff80ef514ccb7c20 RCX: 0000000000000000
> RDX: 0000000000000000 RSI: 0000000000000000 RDI:
> 0000000080000000
> RBP: ff80ef514ccb7ca0 R08: 0000000000000246 R09: 0000000000000000
> R10: ffbe1c5fb6497e01 R11: 0000000000000003 R12: ff4ef6240d34a6a0
> R13: 0000000000000000 R14: ff4ef62bd9abe400 R15: 0000000000000536
> FS: 0000000000000000(0000) GS:ff4ef629f203f000(0000)
> knlGS:0000000000000000
> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: ffc0e085fa000010 CR3: 00000034082dd004 CR4: 0000000000771ef0
> PKRU: 55555554
> Call Trace:
> <TASK>
> ice_napi_poll+0xd6f/0xf10 [ice]
> __napi_poll+0xbf/0x200
> bpf_trampoline_6442499332+0x79/0x123
> __napi_poll+0x5/0x200
> net_rx_action+0x325/0x7c0
> handle_softirqs+0xd3/0x270
> run_ksoftirqd+0x25/0x30
> smpboot_thread_fn+0xf3/0x220
> kthread+0xfd/0x240
> ret_from_fork+0x12e/0x190
> ret_from_fork_asm+0x1a/0x30
> </TASK>
>
> Fixes: 93f53db9f9dc ("ice: switch to Page Pool")
> Cc: stable@vger.kernel.org # 6.18+
> Signed-off-by: Frederick Lawler <fred@cloudflare.com>
> ---
> drivers/net/ethernet/intel/ice/ice_txrx.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice_txrx.c
> b/drivers/net/ethernet/intel/ice/ice_txrx.c
> index 35a480a1e172..a4b7d772e21e 100644
> --- a/drivers/net/ethernet/intel/ice/ice_txrx.c
> +++ b/drivers/net/ethernet/intel/ice/ice_txrx.c
> @@ -1041,7 +1041,6 @@ static int ice_clean_rx_irq(struct ice_rx_ring
> *rx_ring, int budget)
>
> construct_skb:
> skb = xdp_build_skb_from_buff(&xdp->base);
> - xdp->data = NULL;
>
> /* exit if we failed to retrieve a buffer */
> if (!skb) {
> @@ -1050,6 +1049,8 @@ static int ice_clean_rx_irq(struct ice_rx_ring
> *rx_ring, int budget)
> continue;
> }
>
> + xdp->data = NULL;
> +
> vlan_tci = ice_get_vlan_tci(rx_desc);
>
> /* probably a little skewed due to removing CRC */
>
> ---
> base-commit: c1c39137dcc3134010566ff29a81c93124efa539
> change-id: 20261202-ice-xdp-fix-upstream-c1c25b0547bd
>
> Best regards,
> --
> Frederick Lawler <fred@cloudflare.com>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-12-02 23:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02 23:01 [PATCH net] ice: Fix page fault on XDP_PASS skb allocation failure Frederick Lawler
2026-12-02 23:05 ` netdev-bot+sinfo
2026-12-02 23:16 ` Keller, Jacob E
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox