summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2012-02-22 12:03:30 +0100
committerClark Williams <williams@redhat.com>2012-04-13 11:01:52 -0500
commite15ffe4a7a13065eb2bafa7e262b169d2b2600c2 (patch)
tree9022fc356feefdcdcf429862e8fc1b55922708ab /include/net
parentb3b33f1273dd90754c0a1592bfe4d95f7eeaaaa9 (diff)
seqlock: Prevent rt starvation
If a low prio writer gets preempted while holding the seqlock write locked, a high prio reader spins forever on RT. To prevent this let the reader grab the spinlock, so it blocks and eventually boosts the writer. This way the writer can proceed and endless spinning is prevented. For seqcount writers we disable preemption over the update code path. Thaanks to Al Viro for distangling some VFS code to make that possible. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: stable-rt@vger.kernel.org
Diffstat (limited to 'include/net')
-rw-r--r--include/net/neighbour.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net/neighbour.h b/include/net/neighbour.h
index 34c996f46181..8e626fa6ccde 100644
--- a/include/net/neighbour.h
+++ b/include/net/neighbour.h
@@ -394,7 +394,7 @@ struct neighbour_cb {
#define NEIGH_CB(skb) ((struct neighbour_cb *)(skb)->cb)
-static inline void neigh_ha_snapshot(char *dst, const struct neighbour *n,
+static inline void neigh_ha_snapshot(char *dst, struct neighbour *n,
const struct net_device *dev)
{
unsigned int seq;