Streams ioctl for _I_CMD within kernel causes EFAULT
If a kernel module issues a streams ioctl call for _I_CMD, then it will fail with EFAULT.
This is because
strioctl() wrongly attempts to use
copyin() on the data despite the presence of the
Example code (vp is a pointer to a TLI vnode).
strcmd_t strcmd; int32_t rval; strcmd.sc_cmd = TI_GETMYNAME; strcmd.sc_timeout = 1; strcmd.sc_len = STRCMDBUFSIZE; ASSERT0(VOP_IOCTL(vp, _I_CMD, (intptr_t)&strcmd, FKIOCTL, CRED(), &rval, NULL));
Updated by Electric Monk 8 months ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
commit e63ea1f970505bef26ee06b3cef54076ad25b94e Author: Andy Fiddaman <email@example.com> Date: 2019-12-03T18:28:38.000Z 12043 Streams ioctl for _I_CMD within kernel causes EFAULT Reviewed by: John Levon <firstname.lastname@example.org> Reviewed by: Jason King <email@example.com> Approved by: Robert Mustacchi <firstname.lastname@example.org>