HomeFreeBSD

When an underlying ioctl(2) handler returns an error, our ioctl(2)
rS206637Unpublished

Unpublished Commit ยท Learn More

No further details are available.

Description

When an underlying ioctl(2) handler returns an error, our ioctl(2)
interface considers that it hits a fatal error, and will not copyout
the request structure back for _IOW and _IOWR ioctls, keeping them
untouched.

The previous implementation of the SIOCGIFDESCR ioctl intends to
feed the buffer length back to userland. However, if we return
an error, the feedback would be defeated and ifconfig(8) would
trap into an infinite loop.

This commit changes SIOCGIFDESCR to set buffer field to NULL to
indicate the previous ENAMETOOLONG case.

Reported by: bschmidt
MFC after: 2 weeks

Details

Provenance
delphijAuthored on
Parents
rS206636: Revert accidental desorting.
Branches
Unknown
Tags
Unknown

Event Timeline