diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2012-04-18 16:11:23 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-19 15:37:48 -0400 |
commit | 3adadc08cc1e2cbcc15a640d639297ef5fcb17f5 (patch) | |
tree | 20990c83f62157caf753736e63ea98548404a954 /net/x25/x25_dev.c | |
parent | 996f73937cd85031da8dbcd3222a710cb762d428 (diff) | |
download | op-kernel-dev-3adadc08cc1e2cbcc15a640d639297ef5fcb17f5.zip op-kernel-dev-3adadc08cc1e2cbcc15a640d639297ef5fcb17f5.tar.gz |
net ax25: Reorder ax25_exit to remove races.
While reviewing the sysctl code in ax25 I spotted races in ax25_exit
where it is possible to receive notifications and packets after already
freeing up some of the data structures needed to process those
notifications and updates.
Call unregister_netdevice_notifier early so that the rest of the cleanup
code does not need to deal with network devices. This takes advantage
of my recent enhancement to unregister_netdevice_notifier to send
unregister notifications of all network devices that are current
registered.
Move the unregistration for packet types, socket types and protocol
types before we cleanup any of the ax25 data structures to remove the
possibilities of other races.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/x25/x25_dev.c')
0 files changed, 0 insertions, 0 deletions