diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2012-02-22 11:03:30 (GMT) |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2015-02-13 22:21:03 (GMT) |
commit | d4ac6eac18c848277ba4e553ca51c36216afee98 (patch) | |
tree | 09d4015ec2906f2fc2d7319f1ce727e9adf76e4b /include/net | |
parent | 9a27bb504194a8f6351513b3153c290c2ec90b09 (diff) | |
download | linux-fsl-qoriq-d4ac6eac18c848277ba4e553ca51c36216afee98.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.h | 2 | ||||
-rw-r--r-- | include/net/neighbour.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/net/dst.h b/include/net/dst.h index 9c12376..2322201 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; |