Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: [netbsd-8] src/sys/net



Module Name:    src
Committed By:   martin
Date:           Thu Mar  7 16:59:10 UTC 2019

Modified Files:
        src/sys/net [netbsd-8]: rtsock.c

Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #1203):

        sys/net/rtsock.c: revision 1.247

Protect sysctl_rtable with KERNEL_LOCK and softnet_lock

In the function the routing table could be accessed without any locks, which was
unsafe.  Actually, on netbsd-7, a kernel panic happened(*).  The situation of
locking hasn't changed since netbsd-7 so we still need to hold the big locks on
-current (and netbsd-8) too.

Note that if NET_MPSAFE is enabled, the routing table is protected by its own
lock and we don't need the locks.

Reported and tested on netbsd-7 by sborrill@
(*) http://mail-index.netbsd.org/tech-net/2018/11/08/msg007153.html


To generate a diff of this commit:
cvs rdiff -u -r1.213.2.11 -r1.213.2.12 src/sys/net/rtsock.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index