Date: Mon, 22 Dec 2008 16:33:21 GMT From: James Juran <james.juran@baesystems.com> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/129861: Argument names reversed in pf_table.c:_copyout() Message-ID: <200812221633.mBMGXL2K019523@www.freebsd.org> Resent-Message-ID: <200812221640.mBMGe1bG016037@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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 >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Dec 22 16:40:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: James Juran >Release: CURRENT >Organization: BAE Systems >Environment: n/a >Description: 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. >How-To-Repeat: n/a >Fix: 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; PF_UNLOCK(); - r = copyout(uaddr, kaddr, len); + r = copyout(kaddr, uaddr, len); PF_LOCK(); return (r); >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812221633.mBMGXL2K019523>