git: 2fc27a1ceb41 - stable/13 - ipfilter: Locking sysctls here is not required

Cy Schubert cy at FreeBSD.org
Mon Oct 4 13:13:19 UTC 2021


The branch stable/13 has been updated by cy:

URL: https://cgit.FreeBSD.org/src/commit/?id=2fc27a1ceb416da0eb5c21927a678130c6e23f3c

commit 2fc27a1ceb416da0eb5c21927a678130c6e23f3c
Author:     Cy Schubert <cy at FreeBSD.org>
AuthorDate: 2021-09-24 18:18:42 +0000
Commit:     Cy Schubert <cy at FreeBSD.org>
CommitDate: 2021-10-04 03:56:58 +0000

    ipfilter: Locking sysctls here is not required
    
    Locking of data structures touched by sysctls is more finely locked
    in ipflter therefore higher level locks are redundant.
    
    (cherry picked from commit 1605eaa6d23ea5161b5ab8461e83ab32a591a4fc)
---
 sys/contrib/ipfilter/netinet/mlfk_ipl.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/sys/contrib/ipfilter/netinet/mlfk_ipl.c b/sys/contrib/ipfilter/netinet/mlfk_ipl.c
index 6e49ef77b486..57b6ce541be9 100644
--- a/sys/contrib/ipfilter/netinet/mlfk_ipl.c
+++ b/sys/contrib/ipfilter/netinet/mlfk_ipl.c
@@ -343,7 +343,6 @@ sysctl_ipf_int ( SYSCTL_HANDLER_ARGS )
 {
 	int error = 0;
 
-	WRITE_ENTER(&V_ipfmain.ipf_mutex);
 	if (arg1)
 		error = SYSCTL_OUT(req, arg1, sizeof(int));
 	else
@@ -362,7 +361,6 @@ sysctl_ipf_int ( SYSCTL_HANDLER_ARGS )
 	}
 
 sysctl_error:
-	RWLOCK_EXIT(&V_ipfmain.ipf_mutex);
 	return (error);
 }
 


More information about the dev-commits-src-branches mailing list