aboutsummaryrefslogtreecommitdiffstats
path: root/net/llc/llc_station.c
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2012-08-12 22:50:55 -0400
committerDavid S. Miller <davem@davemloft.net>2012-08-14 19:52:02 -0400
commitaadf31de16a7b2878af00a02e6557df84efa784b (patch)
tree8ad3aa78fdabdc1c60e5608b342ec1782eb72513 /net/llc/llc_station.c
parentf4f8720febf0d785a054fc09bde5e3ad09728a58 (diff)
llc: Fix races between llc2 handler use and (un)registration
When registering the handlers, any state they rely on must be completely initialised first. When unregistering, we must wait until they are definitely no longer running. llc_rcv() must also avoid reading the handler pointers again after checking for NULL. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/llc/llc_station.c')
-rw-r--r--net/llc/llc_station.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/llc/llc_station.c b/net/llc/llc_station.c
index bba5184fafd7..b2f2bac2c2a2 100644
--- a/net/llc/llc_station.c
+++ b/net/llc/llc_station.c
@@ -696,9 +696,9 @@ void __init llc_station_init(void)
696 (unsigned long)&llc_main_station); 696 (unsigned long)&llc_main_station);
697 llc_main_station.ack_timer.expires = jiffies + 697 llc_main_station.ack_timer.expires = jiffies +
698 sysctl_llc_station_ack_timeout; 698 sysctl_llc_station_ack_timeout;
699 llc_set_station_handler(llc_station_rcv);
700 llc_main_station.maximum_retry = 1; 699 llc_main_station.maximum_retry = 1;
701 llc_main_station.state = LLC_STATION_STATE_UP; 700 llc_main_station.state = LLC_STATION_STATE_UP;
701 llc_set_station_handler(llc_station_rcv);
702} 702}
703 703
704void llc_station_exit(void) 704void llc_station_exit(void)