af_packet: TPACKET_V3: replace busy-wait loop
A busy-wait loop is used to implement waiting for bits to be copied from the skb to the kernel buffer before retiring a block. This is a problem on PREEMPT_RT because the copying task could be preempted by the busy-waiting task and thus live lock in the busy-wait loop. Replace the busy-wait logic with an rwlock_t. This provides lockdep coverage and makes the code RT ready. Signed-off-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:

committed by
Jakub Kicinski

parent
999cf8aeb6
commit
632ca50f2c
@@ -39,7 +39,7 @@ struct tpacket_kbdq_core {
|
||||
char *nxt_offset;
|
||||
struct sk_buff *skb;
|
||||
|
||||
atomic_t blk_fill_in_prog;
|
||||
rwlock_t blk_fill_in_prog_lock;
|
||||
|
||||
/* Default is set to 8ms */
|
||||
#define DEFAULT_PRB_RETIRE_TOV (8)
|
||||
|
Reference in New Issue
Block a user