diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2012-03-07 20:10:04 (GMT) |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2014-04-10 00:19:46 (GMT) |
commit | 75e5aaab8bf4f8a9eaf1e8fd119f8a3bbd74b7a5 (patch) | |
tree | e7b8bb770a5209e1510a1b0f2f0bbc3b1e759bb7 /net/packet | |
parent | b4e35a44d3c268150f3803121e1d9ca1e5e9f998 (diff) | |
download | linux-fsl-qoriq-75e5aaab8bf4f8a9eaf1e8fd119f8a3bbd74b7a5.tar.xz |
net: Use cpu_chill() instead of cpu_relax()
Retry loops on RT might loop forever when the modifying side was
preempted. Use cpu_chill() instead of cpu_relax() to let the system
make progress.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable-rt@vger.kernel.org
Diffstat (limited to 'net/packet')
-rw-r--r-- | net/packet/af_packet.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index 88cfbc1..d1705d0 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -63,6 +63,7 @@ #include <linux/if_packet.h> #include <linux/wireless.h> #include <linux/kernel.h> +#include <linux/delay.h> #include <linux/kmod.h> #include <linux/slab.h> #include <linux/vmalloc.h> @@ -630,7 +631,7 @@ static void prb_retire_rx_blk_timer_expired(unsigned long data) if (BLOCK_NUM_PKTS(pbd)) { while (atomic_read(&pkc->blk_fill_in_prog)) { /* Waiting for skb_copy_bits to finish... */ - cpu_relax(); + cpu_chill(); } } @@ -881,7 +882,7 @@ static void prb_retire_current_block(struct tpacket_kbdq_core *pkc, if (!(status & TP_STATUS_BLK_TMO)) { while (atomic_read(&pkc->blk_fill_in_prog)) { /* Waiting for skb_copy_bits to finish... */ - cpu_relax(); + cpu_chill(); } } prb_close_block(pkc, pbd, po, status); |