[Bug 262671] Kernel panics after a invalid SNDCTL_MIXERINFO ioctl

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 21 Mar 2022 20:51:30 UTC

--- Comment #12 from Aleksander Slomka <alex@alexslomka.xyz> ---
(In reply to Ed Maste from comment #11)

Thank you for the help! The patch indeed solves the issue for me. Now the
`ioctl` properly returns `EINVAL`:

 31415 test     CALL  ioctl(0x3,SNDCTL_MIXERINFO,0x8210902e0)
 31415 test     RET   ioctl -1 errno 22 Invalid argument

It makes sense that this works, since PCM_REGISTERED is checking if it's
argument is equal to NULL, just like my patch did, but I don't understand why
the `if` statement didn't work when the condition was in reverse order.

You are receiving this mail because:
You are the assignee for the bug.