Received: by mail.netbsd.org (Postfix, from userid 605) id E634C84F94; Mon, 28 Mar 2022 12:53:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 2F4D084F4A for ; Mon, 28 Mar 2022 12:44:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id d3k3-hqubTD2 for ; Mon, 28 Mar 2022 12:44:06 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id A95BD84F35 for ; Mon, 28 Mar 2022 12:44:06 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id A6660FB24; Mon, 28 Mar 2022 12:44:06 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Mon, 28 Mar 2022 12:44:06 +0000 From: "Taylor R Campbell" Subject: CVS commit: src/sys/dev/usb To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20220328124406.A6660FB24@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Taylor R Campbell" Mail-Followup-To: source-changes-d@NetBSD.org List-Unsubscribe: Module Name: src Committed By: riastradh Date: Mon Mar 28 12:44:06 UTC 2022 Modified Files: src/sys/dev/usb: uhidev.c Log Message: uhidev(9): Fix race between uhidev_close and uhidev_intr. uhidev_intr currently relies on the kernel lock to serialize access to struct uhidev::sc_state, but if the driver's sc_intr function sleeps (which it may do, even though this runs is softint context -- it may sleep on an adaptive lock), uhidev_close might return while the driver's sc_intr function is still in flight. This avoids that race, and makes progress toward MP-safe uhidev. To generate a diff of this commit: cvs rdiff -u -r1.88 -r1.89 src/sys/dev/usb/uhidev.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.