Commit 88fd1cb
af_packet: TPACKET_V3: fix fill status rwlock imbalance
After @blk_fill_in_prog_lock is acquired there is an early out vnet
situation that can occur. In that case, the rwlock needs to be
released.
Also, since @blk_fill_in_prog_lock is only acquired when @tp_version
is exactly TPACKET_V3, only release it on that exact condition as
well.
And finally, add sparse annotation so that it is clearer that
prb_fill_curr_block() and prb_clear_blk_fill_status() are acquiring
and releasing @blk_fill_in_prog_lock, respectively. sparse is still
unable to understand the balance, but the warnings are now on a
higher level that make more sense.
Fixes: 632ca50 ("af_packet: TPACKET_V3: replace busy-wait loop")
Signed-off-by: John Ogness <john.ogness@linutronix.de>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent 94c7eb5 commit 88fd1cb
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
941 | 941 | | |
942 | 942 | | |
943 | 943 | | |
| 944 | + | |
944 | 945 | | |
945 | 946 | | |
946 | 947 | | |
| |||
989 | 990 | | |
990 | 991 | | |
991 | 992 | | |
| 993 | + | |
992 | 994 | | |
993 | 995 | | |
994 | 996 | | |
| |||
2286 | 2288 | | |
2287 | 2289 | | |
2288 | 2290 | | |
2289 | | - | |
| 2291 | + | |
| 2292 | + | |
| 2293 | + | |
2290 | 2294 | | |
| 2295 | + | |
2291 | 2296 | | |
2292 | 2297 | | |
2293 | 2298 | | |
| |||
2393 | 2398 | | |
2394 | 2399 | | |
2395 | 2400 | | |
2396 | | - | |
| 2401 | + | |
2397 | 2402 | | |
2398 | 2403 | | |
2399 | 2404 | | |
| |||
0 commit comments