git: kernel - Fix SMP races in raw socket code

Matthew Dillon dillon at crater.dragonflybsd.org
Tue Aug 13 10:59:21 PDT 2019


commit 6622ec188336df8eefdec5b7ffd183297b3be769
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Tue Aug 13 10:55:50 2019 -0700

    kernel - Fix SMP races in raw socket code
    
    * The raw socket code was not properly dealing with SMP races
      in attach/detach verses receive processing.  Replace the token
      with a lockmgr lock.
    
      These issues never really caused an issue because raw sockets just
      aren't used very often, but they still need to be dealt with.
    
    * SMP performance is not super-critical in this case so I just use a
      normal lock and keep it simple.

Summary of changes:
 sys/net/raw_cb.c     | 9 ++++++++-
 sys/net/raw_cb.h     | 1 +
 sys/net/raw_usrreq.c | 9 ++++-----
 3 files changed, 13 insertions(+), 6 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/6622ec188336df8eefdec5b7ffd183297b3be769


-- 
DragonFly BSD source repository


More information about the Commits mailing list