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
This commit is contained in:
Alexander V. Chernikov 2015-05-24 11:24:14 +00:00
parent 7ad1ac7d6a
commit 0bf993fcc1

View File

@ -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 */