diff options
Diffstat (limited to 'net/core/neighbour.c')
-rw-r--r-- | net/core/neighbour.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 0ab1987b9348..e7300b6b4079 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -577,9 +577,10 @@ void neigh_destroy(struct neighbour *neigh) | |||
577 | while ((hh = neigh->hh) != NULL) { | 577 | while ((hh = neigh->hh) != NULL) { |
578 | neigh->hh = hh->hh_next; | 578 | neigh->hh = hh->hh_next; |
579 | hh->hh_next = NULL; | 579 | hh->hh_next = NULL; |
580 | write_lock_bh(&hh->hh_lock); | 580 | |
581 | write_seqlock_bh(&hh->hh_lock); | ||
581 | hh->hh_output = neigh_blackhole; | 582 | hh->hh_output = neigh_blackhole; |
582 | write_unlock_bh(&hh->hh_lock); | 583 | write_sequnlock_bh(&hh->hh_lock); |
583 | if (atomic_dec_and_test(&hh->hh_refcnt)) | 584 | if (atomic_dec_and_test(&hh->hh_refcnt)) |
584 | kfree(hh); | 585 | kfree(hh); |
585 | } | 586 | } |
@@ -897,9 +898,9 @@ static void neigh_update_hhs(struct neighbour *neigh) | |||
897 | 898 | ||
898 | if (update) { | 899 | if (update) { |
899 | for (hh = neigh->hh; hh; hh = hh->hh_next) { | 900 | for (hh = neigh->hh; hh; hh = hh->hh_next) { |
900 | write_lock_bh(&hh->hh_lock); | 901 | write_seqlock_bh(&hh->hh_lock); |
901 | update(hh, neigh->dev, neigh->ha); | 902 | update(hh, neigh->dev, neigh->ha); |
902 | write_unlock_bh(&hh->hh_lock); | 903 | write_sequnlock_bh(&hh->hh_lock); |
903 | } | 904 | } |
904 | } | 905 | } |
905 | } | 906 | } |
@@ -1089,7 +1090,7 @@ static void neigh_hh_init(struct neighbour *n, struct dst_entry *dst, | |||
1089 | break; | 1090 | break; |
1090 | 1091 | ||
1091 | if (!hh && (hh = kzalloc(sizeof(*hh), GFP_ATOMIC)) != NULL) { | 1092 | if (!hh && (hh = kzalloc(sizeof(*hh), GFP_ATOMIC)) != NULL) { |
1092 | rwlock_init(&hh->hh_lock); | 1093 | seqlock_init(&hh->hh_lock); |
1093 | hh->hh_type = protocol; | 1094 | hh->hh_type = protocol; |
1094 | atomic_set(&hh->hh_refcnt, 0); | 1095 | atomic_set(&hh->hh_refcnt, 0); |
1095 | hh->hh_next = NULL; | 1096 | hh->hh_next = NULL; |