diff options
Diffstat (limited to 'net/tipc')
-rw-r--r-- | net/tipc/subscr.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/tipc/subscr.c b/net/tipc/subscr.c index 9d94e65d0894..271cd66e4b3b 100644 --- a/net/tipc/subscr.c +++ b/net/tipc/subscr.c | |||
@@ -141,6 +141,11 @@ void tipc_subscrp_report_overlap(struct tipc_subscription *sub, u32 found_lower, | |||
141 | static void tipc_subscrp_timeout(unsigned long data) | 141 | static void tipc_subscrp_timeout(unsigned long data) |
142 | { | 142 | { |
143 | struct tipc_subscription *sub = (struct tipc_subscription *)data; | 143 | struct tipc_subscription *sub = (struct tipc_subscription *)data; |
144 | struct tipc_subscriber *subscriber = sub->subscriber; | ||
145 | |||
146 | spin_lock_bh(&subscriber->lock); | ||
147 | tipc_nametbl_unsubscribe(sub); | ||
148 | spin_unlock_bh(&subscriber->lock); | ||
144 | 149 | ||
145 | /* Notify subscriber of timeout */ | 150 | /* Notify subscriber of timeout */ |
146 | tipc_subscrp_send_event(sub, sub->evt.s.seq.lower, sub->evt.s.seq.upper, | 151 | tipc_subscrp_send_event(sub, sub->evt.s.seq.lower, sub->evt.s.seq.upper, |
@@ -173,7 +178,6 @@ static void tipc_subscrp_kref_release(struct kref *kref) | |||
173 | struct tipc_subscriber *subscriber = sub->subscriber; | 178 | struct tipc_subscriber *subscriber = sub->subscriber; |
174 | 179 | ||
175 | spin_lock_bh(&subscriber->lock); | 180 | spin_lock_bh(&subscriber->lock); |
176 | tipc_nametbl_unsubscribe(sub); | ||
177 | list_del(&sub->subscrp_list); | 181 | list_del(&sub->subscrp_list); |
178 | atomic_dec(&tn->subscription_count); | 182 | atomic_dec(&tn->subscription_count); |
179 | spin_unlock_bh(&subscriber->lock); | 183 | spin_unlock_bh(&subscriber->lock); |
@@ -205,6 +209,7 @@ static void tipc_subscrb_subscrp_delete(struct tipc_subscriber *subscriber, | |||
205 | if (s && memcmp(s, &sub->evt.s, sizeof(struct tipc_subscr))) | 209 | if (s && memcmp(s, &sub->evt.s, sizeof(struct tipc_subscr))) |
206 | continue; | 210 | continue; |
207 | 211 | ||
212 | tipc_nametbl_unsubscribe(sub); | ||
208 | tipc_subscrp_get(sub); | 213 | tipc_subscrp_get(sub); |
209 | spin_unlock_bh(&subscriber->lock); | 214 | spin_unlock_bh(&subscriber->lock); |
210 | tipc_subscrp_delete(sub); | 215 | tipc_subscrp_delete(sub); |