From nobody Mon Mar 21 20:51:30 2022 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AC7EE1A17AFA for ; Mon, 21 Mar 2022 20:51:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KMmxZ2H33z4m9K for ; Mon, 21 Mar 2022 20:51:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2BF9B224BD for ; Mon, 21 Mar 2022 20:51:30 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 22LKpUPW049665 for ; Mon, 21 Mar 2022 20:51:30 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 22LKpU7q049664 for bugs@FreeBSD.org; Mon, 21 Mar 2022 20:51:30 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 262671] Kernel panics after a invalid SNDCTL_MIXERINFO ioctl Date: Mon, 21 Mar 2022 20:51:30 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: alex@alexslomka.xyz X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647895890; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=aO1em9YWNz507bkfjLWYiDc2jee/9ruZi6s6sUfiR+M=; b=iBAypZpetLNt96VM820noOFoyZMUHlOgDvXImNJMj5mI6qTMSx2nKOlTqQ8KpRRR9V/3FW XfdB2z+300ISOerNQEe+9NrlnvT94vae+5l0S7w/ZI48HWmklWAop1blDQZuzz3Ncr2Kvj uNmgy6shmAzGWKmDjVK1PcI0YKqNp/XiJ225uiZywl17wJHm1xOvjkhAUFnBj2lYqBk2JO YEyRseqdwMwQ4/F5dbvV7V1ymp6AZ8LXTnKEMicEWpIqb93fIxUBkFNUFzaE35ewLR0WGq bJR3eG1Cy9cuvAJ3WFbzlZAWSgfSRMnDVENrt+Eq8SFiFpf/VxlniAIPOFjXdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1647895890; a=rsa-sha256; cv=none; b=M/a0OYuNKMwNvdAaB+GqHtJVqS1KfIPSnKdr21VE9L1yZ4tR95oCvDiGLTPnLHi6Ph0xvf Bbg2M5aEcPaM2eapMZyHdnKdYToBahOX4/ZAyr+CI5hsrlixo9aSOoxrX4F2tiFSt/SwLU Zf+N3HUkSmRhfWHU0hNcmCwM63LAtOaDs39daxnvps+mkD80lZnTIvTu1WXwlF7jCxGpo4 GlTaaBekg3tY3iayKGFM14O1XHV0fvhEbh0KEdp0Zqnwoasm8qysLoIxqQ8l96D3Kov5Ei kg9zl19zhUKtaDeVWSiobxD0bYXnnnVEyxlxR36eBXQweHSeZGbKZBWJYAHEIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D262671 --- Comment #12 from Aleksander Slomka --- (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 w= hy the `if` statement didn't work when the condition was in reverse order. --=20 You are receiving this mail because: You are the assignee for the bug.=