aboutsummaryrefslogtreecommitdiffstats
path: root/net/llc/llc_station.c
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2012-08-13 02:50:55 +0000
committerDavid S. Miller <davem@davemloft.net>2012-08-14 16:52:02 -0700
commitaadf31de16a7b2878af00a02e6557df84efa784b (patch)
tree8ad3aa78fdabdc1c60e5608b342ec1782eb72513 /net/llc/llc_station.c
parentllc2: Call llc_station_exit() on llc2_init() failure path (diff)
downloadlinux-dev-aadf31de16a7b2878af00a02e6557df84efa784b.tar.xz
linux-dev-aadf31de16a7b2878af00a02e6557df84efa784b.zip
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)
(unsigned long)&llc_main_station);
llc_main_station.ack_timer.expires = jiffies +
sysctl_llc_station_ack_timeout;
- llc_set_station_handler(llc_station_rcv);
llc_main_station.maximum_retry = 1;
llc_main_station.state = LLC_STATION_STATE_UP;
+ llc_set_station_handler(llc_station_rcv);
}
void llc_station_exit(void)