Date: Tue, 11 Nov 2008 22:59:41 +0000 (UTC) From: Robert Watson <rwatson@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r184857 - head/sys/security/audit Message-ID: <200811112259.mABMxf15013554@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rwatson Date: Tue Nov 11 22:59:40 2008 New Revision: 184857 URL: http://svn.freebsd.org/changeset/base/184857 Log: Minor style tweaks and change lock name string to use _'s and not spaces to improve parseability. Modified: head/sys/security/audit/audit.c Modified: head/sys/security/audit/audit.c ============================================================================== --- head/sys/security/audit/audit.c Tue Nov 11 21:57:03 2008 (r184856) +++ head/sys/security/audit/audit.c Tue Nov 11 22:59:40 2008 (r184857) @@ -166,7 +166,8 @@ static struct cv audit_fail_cv; static struct auditinfo_addr audit_kinfo; static struct rwlock audit_kinfo_lock; -#define KINFO_LOCK_INIT() rw_init(&audit_kinfo_lock, "kernel audit info lock") +#define KINFO_LOCK_INIT() rw_init(&audit_kinfo_lock, \ + "audit_kinfo_lock") #define KINFO_RLOCK() rw_rlock(&audit_kinfo_lock) #define KINFO_WLOCK() rw_wlock(&audit_kinfo_lock) #define KINFO_RUNLOCK() rw_runlock(&audit_kinfo_lock) @@ -179,6 +180,7 @@ audit_set_kinfo(struct auditinfo_addr *a KASSERT(ak->ai_termid.at_type == AU_IPv4 || ak->ai_termid.at_type == AU_IPv6, ("audit_set_kinfo: invalid address type")); + KINFO_WLOCK(); audit_kinfo = *ak; KINFO_WUNLOCK(); @@ -191,6 +193,7 @@ audit_get_kinfo(struct auditinfo_addr *a KASSERT(audit_kinfo.ai_termid.at_type == AU_IPv4 || audit_kinfo.ai_termid.at_type == AU_IPv6, ("audit_set_kinfo: invalid address type")); + KINFO_RLOCK(); *ak = audit_kinfo; KINFO_RUNLOCK();
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811112259.mABMxf15013554>