Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Jul 2015 09:19:06 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   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
Message-ID:  <201507280919.t6S9J6II015860@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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/8/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c
Directory Properties:
  stable/8/   (props changed)
  stable/8/sys/   (props changed)
  stable/8/sys/dev/   (props changed)
  stable/8/sys/dev/cxgb/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/10/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c
  stable/7/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/10/   (props changed)
  stable/7/   (props changed)
  stable/7/sys/   (props changed)
  stable/9/   (props changed)
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/8/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c
==============================================================================
--- stable/8/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c	Tue Jul 28 09:16:54 2015	(r285941)
+++ stable/8/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_provider.c	Tue Jul 28 09:19:04 2015	(r285942)
@@ -340,7 +340,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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507280919.t6S9J6II015860>