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:
parent
bb7e179225
commit
2fbf72af9e
@ -96,7 +96,7 @@
|
|||||||
|
|
||||||
#define SIOCGIFSTATUS _IOWR('i', 59, struct ifstat) /* get IF status */
|
#define SIOCGIFSTATUS _IOWR('i', 59, struct ifstat) /* get IF status */
|
||||||
#define SIOCSIFLLADDR _IOW('i', 60, struct ifreq) /* set linklevel addr */
|
#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 SIOCSIFPHYADDR _IOW('i', 70, struct ifaliasreq) /* set gif addres */
|
||||||
#define SIOCGIFPSRCADDR _IOWR('i', 71, struct ifreq) /* get gif psrc addr */
|
#define SIOCGIFPSRCADDR _IOWR('i', 71, struct ifreq) /* get gif psrc addr */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user