diff options
author | Jakub Kicinski <kuba@kernel.org> | 2024-06-27 12:12:07 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2024-06-27 12:14:11 -0700 |
commit | 193b9b200224dab4eaec407eb2955303a521f5b6 (patch) | |
tree | 95366182cc2871667a60613a921f7bfae0b9e2c7 /lib | |
parent | cce346d441399209bd582f1aaf190a7784dd12f8 (diff) | |
parent | ffb7aa9fedad817b9fa0d868a3065c4eeb1f68c4 (diff) | |
download | linux-193b9b200224dab4eaec407eb2955303a521f5b6.tar.gz linux-193b9b200224dab4eaec407eb2955303a521f5b6.tar.bz2 linux-193b9b200224dab4eaec407eb2955303a521f5b6.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR.
No conflicts.
Adjacent changes:
e3f02f32a050 ("ionic: fix kernel panic due to multi-buffer handling")
d9c04209990b ("ionic: Mark error paths in the data path as unlikely")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/closure.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/closure.c b/lib/closure.c index 07409e9e35a5..2e1ee9fdec08 100644 --- a/lib/closure.c +++ b/lib/closure.c @@ -17,12 +17,18 @@ static inline void closure_put_after_sub(struct closure *cl, int flags) { int r = flags & CLOSURE_REMAINING_MASK; - BUG_ON(flags & CLOSURE_GUARD_MASK); - BUG_ON(!r && (flags & ~CLOSURE_DESTRUCTOR)); + if (WARN(flags & CLOSURE_GUARD_MASK, + "closure has guard bits set: %x (%u)", + flags & CLOSURE_GUARD_MASK, (unsigned) __fls(r))) + r &= ~CLOSURE_GUARD_MASK; if (!r) { smp_acquire__after_ctrl_dep(); + WARN(flags & ~CLOSURE_DESTRUCTOR, + "closure ref hit 0 with incorrect flags set: %x (%u)", + flags & ~CLOSURE_DESTRUCTOR, (unsigned) __fls(flags)); + cl->closure_get_happened = false; if (cl->fn && !(flags & CLOSURE_DESTRUCTOR)) { |