git: tcp: Fix getcred

Sepherosa Ziehau sephe at crater.dragonflybsd.org
Wed Sep 3 06:03:44 PDT 2014


commit 16d3b971c298bb8dbcfc5ed147f5567134f59854
Author: Sepherosa Ziehau <sephe at dragonflybsd.org>
Date:   Wed Sep 3 20:56:59 2014 +0800

    tcp: Fix getcred
    
    - Migrate to the target cpu before looking up tcp inpcb.
    - Save a copy of the ucred then do SYSCTL_OUT, which could block.
      It is not MPSAFE to do the SYSCTL_OUT even on the target CPU;
      the socket might be ripped when SYSCTL_OUT blocked.

Summary of changes:
 sys/netinet/tcp_subr.c | 25 +++++++++++++++++--------
 1 file changed, 17 insertions(+), 8 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/16d3b971c298bb8dbcfc5ed147f5567134f59854


-- 
DragonFly BSD source repository



More information about the Commits mailing list