Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 May 2015 11:24:15 +0000 (UTC)
From:      "Alexander V. Chernikov" <melifaro@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r283364 - head/sys/sys
Message-ID:  <201505241124.t4OBOFe6030452@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: melifaro
Date: Sun May 24 11:24:14 2015
New Revision: 283364
URL: https://svnweb.freebsd.org/changeset/base/283364

Log:
  Fix SIOCGI2C structure requirement.
  
  In reality, SIOCGI2C ioctl requires struct ifreq as many other
  ioctls. Doing copyin() on (significantly) larger struct ifstat sometimes
  triggered EFAULT.
  
  Reported by:	Olivier Cochard-Labbé <olivier at cochard.me>
  MFC after:	1 week

Modified:
  head/sys/sys/sockio.h

Modified: head/sys/sys/sockio.h
==============================================================================
--- head/sys/sys/sockio.h	Sun May 24 11:08:06 2015	(r283363)
+++ head/sys/sys/sockio.h	Sun May 24 11:24:14 2015	(r283364)
@@ -96,7 +96,7 @@
 
 #define	SIOCGIFSTATUS	_IOWR('i', 59, struct ifstat)	/* get IF status */
 #define	SIOCSIFLLADDR	 _IOW('i', 60, struct ifreq)	/* set linklevel addr */
-#define	SIOCGI2C	_IOWR('i', 61, struct ifstat)	/* get I2C data  */
+#define	SIOCGI2C	_IOWR('i', 61, struct ifreq)	/* get I2C data  */
 
 #define	SIOCSIFPHYADDR	 _IOW('i', 70, struct ifaliasreq) /* set gif addres */
 #define	SIOCGIFPSRCADDR	_IOWR('i', 71, struct ifreq)	/* get gif psrc addr */



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