From nobody Sat Dec 24 09:53:15 2022 X-Original-To: dev-commits-src-all@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 4NfK9m02Vqz1Hf6l; Sat, 24 Dec 2022 09:53:16 +0000 (UTC) (envelope-from git@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 4NfK9l6drJz3tpP; Sat, 24 Dec 2022 09:53:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671875595; 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; bh=7lIexEYflZiL0L0GN77U08it0ZKLABtmINleX8fa4pQ=; b=NbV1VmkUH4NBljo0Pn+MC6Rhtsj+4cNZFkMTbwQ1Ry13bJ/zlc1/TRsYe30mDWPyhwalAK kLUXY2uGc5fYZRiZMEr6zE5DmnLxTWv2PRyA16Qt1I6xjbm2lI6AG3UV1WXqJ0c1pmz7MM Wpwo0hvIxXFU6LVEJk/NHhpQ7edOLsjAmf99BrR3ClRuUqnKgXLtHm1mGndS/8/Lw6+AH9 J2O0BbJAZ3whQC43eHS0AYAvhwUraPrl2e8VIYfDX18eDvGaT1Cp6kVcFgSXteHFGLd7d9 pyjWhdy+yPrWVqi6B4tFqqvqKjBjfc4dhnfvysXgoTlAq3LsbCur3C0W9xv+xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1671875595; 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; bh=7lIexEYflZiL0L0GN77U08it0ZKLABtmINleX8fa4pQ=; b=uKzx2RE0IE3rOvG82QjvauJNrEZGBq6CgbfU+9lYkNrCBucAx+usNwtqlEGxmQrZWqi1Sf 4g0rA4KQOiKUMSWeSBlbwrgLvUzpwQRBvWMl7JNuS27iaimiDXoCWRkqcoEKn2HgobsML7 +Vz/JNRr3fXzn1yMIyqO1rgjSrm/vV2ZfHGg+qF4SNQSsfCsTNCEBqMU0OvGSf5DLrtuO2 oDfTEPc82UYuFXYhkV2xzZgJI7wRjiIJoRri25PTE8ou9Reswpd87aonv/9Sqsov6kx7xy 46d/s4hK8AURg/KmNBPSkwfsnGdIEYBDRzVs6XzGEuQzzBnYqdZB7HwFD5YhQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1671875595; a=rsa-sha256; cv=none; b=M0rAWeMGCFdMe4YghRLZMj5BzyLooUR09Re3oI6kujHuWQqLt3ToGvpuko00BlMMYR/RiG APYFlN++ZsUokpiiek9HSeK/RbmoZo6lMRb6HDwry9Xxp3ipA2+wPQ1Wodo054E/xFbvVn RaAW5F4+190NnpLSt5yAPnYh/3XWSOcmvDASTHAArl4RJrI3zd9XrH4Q6QN2iMX99cuLwH +TFmakfO8RW0toD5EnwvdSsEeqo9WsbZRg8XUxGpkdHjbqK/hrS3J9jxT/fDXdSGcBIXei nOJrvgILlh1Nu8HXqpeSZ+kKFDXQSAMCgQWtVbqvAgz8OZPIpU7QFrKoEeXAKA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 4NfK9l5gYfz18Lw; Sat, 24 Dec 2022 09:53:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2BO9rFP1097059; Sat, 24 Dec 2022 09:53:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2BO9rFQ7097058; Sat, 24 Dec 2022 09:53:15 GMT (envelope-from git) Date: Sat, 24 Dec 2022 09:53:15 GMT Message-Id: <202212240953.2BO9rFQ7097058@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Vladimir Kondratyev Subject: git: 7c4c5368aeb8 - main - hidraw(4): Replace Giant with bus_topo_lock List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7c4c5368aeb8dde4d53dfd5055e40cc0b42a0899 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=7c4c5368aeb8dde4d53dfd5055e40cc0b42a0899 commit 7c4c5368aeb8dde4d53dfd5055e40cc0b42a0899 Author: Vladimir Kondratyev AuthorDate: 2022-12-24 09:45:41 +0000 Commit: Vladimir Kondratyev CommitDate: 2022-12-24 09:51:13 +0000 hidraw(4): Replace Giant with bus_topo_lock --- sys/dev/hid/hidraw.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/dev/hid/hidraw.c b/sys/dev/hid/hidraw.c index 8964e31f7bba..4ea39dda3837 100644 --- a/sys/dev/hid/hidraw.c +++ b/sys/dev/hid/hidraw.c @@ -679,10 +679,9 @@ hidraw_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, buf = HIDRAW_LOCAL_ALLOC(local_buf, hgd->hgd_maxlen); copyin(hgd->hgd_data, buf, hgd->hgd_maxlen); - /* Lock newbus around set_report_descr call */ - mtx_lock(&Giant); + bus_topo_lock(); error = hid_set_report_descr(sc->sc_dev, buf, hgd->hgd_maxlen); - mtx_unlock(&Giant); + bus_topo_unlock(); HIDRAW_LOCAL_FREE(local_buf, buf); /* Realloc hidraw input queue */