kern/129861: Argument names reversed in pf_table.c:_copyout()

James Juran james.juran at
Mon Dec 22 08:40:01 PST 2008

>Number:         129861
>Category:       kern
>Synopsis:       Argument names reversed in pf_table.c:_copyout()
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 22 16:40:01 UTC 2008
>Originator:     James Juran
>Release:        CURRENT
BAE Systems
The formal paramaters in _copyout() in sys/contrib/pf/net/pf_table.c are reversed.  This does not cause an actual problem as they are passed on to copyout() correctly, but it is confusing.


See patch.

Patch attached with submission follows:

Index: pf_table.c
--- pf_table.c	(revision 186395)
+++ pf_table.c	(working copy)
@@ -79,12 +79,12 @@ _copyin(const void *uaddr, void *kaddr, 
 static inline int
-_copyout(const void *uaddr, void *kaddr, size_t len)
+_copyout(const void *kaddr, void *uaddr, size_t len)
 	int r;
-	r = copyout(uaddr, kaddr, len);
+	r = copyout(kaddr, uaddr, len);
 	return (r);


More information about the freebsd-bugs mailing list