svn commit: r285942 - in stable: 10/sys/dev/cxgb/ulp/iw_cxgb 7/sys/dev/cxgb/ulp/iw_cxgb 8/sys/dev/cxgb/ulp/iw_cxgb 9/sys/dev/cxgb/ulp/iw_cxgb
Dimitry Andric
dim at FreeBSD.org
Tue Jul 28 09:19:07 UTC 2015
Author: dim
Date: Tue Jul 28 09:19:04 2015
New Revision: 285942
URL: https://svnweb.freebsd.org/changeset/base/285942
Log:
MFC r285340:
Fix swapped copyin(9) arguments in cxgb's iwch_arm_cq() function.
Detected by clang 3.7.0 with the warning:
sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c:309:18: error: variable
'rptr' is uninitialized when used here [-Werror,-Wuninitialized]
chp->cq.rptr = rptr;
^~~~
Modified:
stable/10/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c
Directory Properties:
stable/10/ (props changed)
Changes in other areas also in this revision:
Modified:
stable/7/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c
stable/8/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c
stable/9/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c
Directory Properties:
stable/7/ (props changed)
stable/7/sys/ (props changed)
stable/8/ (props changed)
stable/8/sys/ (props changed)
stable/8/sys/dev/ (props changed)
stable/8/sys/dev/cxgb/ (props changed)
stable/9/ (props changed)
stable/9/sys/ (props changed)
stable/9/sys/dev/ (props changed)
Modified: stable/10/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c
==============================================================================
--- stable/10/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c Tue Jul 28 09:16:54 2015 (r285941)
+++ stable/10/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c Tue Jul 28 09:19:04 2015 (r285942)
@@ -302,7 +302,7 @@ iwch_arm_cq(struct ib_cq *ibcq, enum ib_
else
cq_op = CQ_ARM_AN;
if (chp->user_rptr_addr) {
- if (copyin(&rptr, chp->user_rptr_addr, 4))
+ if (copyin(chp->user_rptr_addr, &rptr, sizeof(rptr)))
return (-EFAULT);
mtx_lock(&chp->lock);
chp->cq.rptr = rptr;
More information about the svn-src-stable-10
mailing list