page_pool: add a lockdep check for recycling in hardirq
authorJakub Kicinski <kuba@kernel.org>
Fri, 4 Aug 2023 18:05:28 +0000 (20:05 +0200)
committerJakub Kicinski <kuba@kernel.org>
Mon, 7 Aug 2023 20:05:53 +0000 (13:05 -0700)
commitff4e538c8c3e675a15e1e49509c55951832e0451
tree99b0cd0097309667febae25692668cdf4891f68e
parent5b899c33b3b852b9559b724cfee67801324a0886
page_pool: add a lockdep check for recycling in hardirq

Page pool use in hardirq is prohibited, add debug checks
to catch misuses. IIRC we previously discussed using
DEBUG_NET_WARN_ON_ONCE() for this, but there were concerns
that people will have DEBUG_NET enabled in perf testing.
I don't think anyone enables lockdep in perf testing,
so use lockdep to avoid pushback and arguing :)

Acked-by: Jesper Dangaard Brouer <hawk@kernel.org>
Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>
Link: https://lore.kernel.org/r/20230804180529.2483231-6-aleksander.lobakin@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/linux/lockdep.h
net/core/page_pool.c