summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2012-02-22 11:03:30 (GMT)
committerScott Wood <scottwood@freescale.com>2014-05-14 18:38:47 (GMT)
commit8544190d15148c5bdd617701f61284c81d55517a (patch)
tree870c9a03bbbad02be095846dc49d0cc6f2b0a3bd /include/net
parent23c62705013c96c8a6c78345639a79462cdf2fdb (diff)
downloadlinux-fsl-qoriq-8544190d15148c5bdd617701f61284c81d55517a.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')
-rw-r--r--include/net/dst.h2
-rw-r--r--include/net/neighbour.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/include/net/dst.h b/include/net/dst.h
index 3c4c944..a158a07 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -395,7 +395,7 @@ static inline void dst_confirm(struct dst_entry *dst)
static inline int dst_neigh_output(struct dst_entry *dst, struct neighbour *n,
struct sk_buff *skb)
{
- const struct hh_cache *hh;
+ struct hh_cache *hh;
if (dst->pending_confirm) {
unsigned long now = jiffies;
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;