summaryrefslogtreecommitdiff
path: root/include/net/neighbour.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2012-02-22 11:03:30 (GMT)
committerScott Wood <scottwood@freescale.com>2014-04-10 00:19:59 (GMT)
commit0ce2cbb8fc86b080f134f3d976cd87e08ed7ebea (patch)
tree2430c3e867ac493aeb6bde19902b016d5cb5a681 /include/net/neighbour.h
parent0c3c1a13909e924e0db663aa08daae807be9ec75 (diff)
downloadlinux-fsl-qoriq-0ce2cbb8fc86b080f134f3d976cd87e08ed7ebea.tar.xz
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/neighbour.h')
-rw-r--r--include/net/neighbour.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/neighbour.h b/include/net/neighbour.h
index 536501a..a9d84bf 100644
--- a/include/net/neighbour.h
+++ b/include/net/neighbour.h
@@ -333,7 +333,7 @@ static inline int neigh_hh_bridge(struct hh_cache *hh, struct sk_buff *skb)
}
#endif
-static inline int neigh_hh_output(const struct hh_cache *hh, struct sk_buff *skb)
+static inline int neigh_hh_output(struct hh_cache *hh, struct sk_buff *skb)
{
unsigned int seq;
int hh_len;
@@ -388,7 +388,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;