Message ID | 20240401215042.1877541-1-almasrymina@google.com (mailing list archive) |
---|---|
Headers | show |
Series | Minor cleanups to skb frag ref/unref | expand |
On Mon, 1 Apr 2024 14:50:36 -0700 Mina Almasry wrote: > This series is largely motivated by a recent discussion where there was > some confusion on how to properly ref/unref pp pages vs non pp pages: > > https://lore.kernel.org/netdev/CAHS8izOoO-EovwMwAm9tLYetwikNPxC0FKyVGu1TPJWSz4bGoA@mail.gmail.com/T/#t > > There is some subtely there because pp uses page->pp_ref_count for > refcounting, while non-pp uses get_page()/put_page() for ref counting. > Getting the refcounting pairs wrong can lead to kernel crash. > > Additionally currently it may not be obvious to skb users unaware of > page pool internals how to properly acquire a ref on a pp frag. It > requires checking of skb->pp_recycle & is_pp_page() to make the correct > calls and may require some handling at the call site aware of arguable pp > internals. I concluded that Olek's series as good to go in, so you gotta rebase.