From nobody Sun Dec 26 03:02:48 2021 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 2869B190ADBE; Sun, 26 Dec 2021 03:02:49 +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 4JM5Fh6FRhz4Zy1; Sun, 26 Dec 2021 03:02:48 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 B6D4922C5E; Sun, 26 Dec 2021 03:02:48 +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 1BQ32mtt021545; Sun, 26 Dec 2021 03:02:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BQ32mxN021544; Sun, 26 Dec 2021 03:02:48 GMT (envelope-from git) Date: Sun, 26 Dec 2021 03:02:48 GMT Message-Id: <202112260302.1BQ32mxN021544@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: 27ac2b2d4970 - main - LinuxKPI: Replace missed 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: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 27ac2b2d49706561ea5d917d77fd6b0a07cb72f8 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640487768; 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=LdkCSeKl+j4COEZwZ5dJzy17Ds6xys8DQB26jmFykAY=; b=tFEPn2QS/cPFfig9K3mrzIDlB7hey1rajSaWUeOGAdo/9c/mkyDYXGme/8dzDds7Oy7HuC 56j/gteD8LB5c6cNJOhs8eIrKb+GhsaybQd9wyDALN1wEJhXZwaY30NVEUKoKDJvZZ/5Jt FTt3zJ0t9dan5iD5UQYbLNTwhy4Oc0MkLCOaRK3AhrHthXemOLCTT/UVBUf2SMOLEKuizL s9533GN8i7QSHsu0bn4PyXnMvVGEXNH2Py21MYB2edsUYP1NinRBaqcW5n4gROOn0NNFqJ eSCEoI0NKNqP6HD/HDoxb3LXl0iNyZrWQ9e4xJR7CIdvPw/rMHG+NcjGkXa2QA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640487768; a=rsa-sha256; cv=none; b=i68A4/rhwjvBEx7o+eFvvxlB0xGx8O9nCgjKVO/ygr9Lr7HZqMON7dTe56zfEzIMMpJ9e0 XtAoDotVX57gRVekaZE9iye0S5b1ukUHYKlRKggmf6+ynv+Xw6fTbCrYxXNnniV7rb76Be kZsWGplrPq29whZnXRrxsEVqMNlHQqZ8bcptNaSQyToi0SwcX8KdRBnl+TTTm6oNJKF/IA a5zcRC5O7FUx6+f3mrXxgb1t3J1mqytA0kw75DtGiiSBT3yZIwx8/ITL4HNms5gZcdsaLD qsxeAouU3fSx81ctgycwkAW//+VOXJnifFIjzMj4YknWKgPwjyWY3AYA80Y+XQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=27ac2b2d49706561ea5d917d77fd6b0a07cb72f8 commit 27ac2b2d49706561ea5d917d77fd6b0a07cb72f8 Author: Alexander Motin AuthorDate: 2021-12-26 03:02:07 +0000 Commit: Alexander Motin CommitDate: 2021-12-26 03:02:07 +0000 LinuxKPI: Replace missed Giant with bus_topo_lock. --- sys/compat/linuxkpi/common/include/linux/device.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/device.h b/sys/compat/linuxkpi/common/include/linux/device.h index e79a101169c6..71cca729243a 100644 --- a/sys/compat/linuxkpi/common/include/linux/device.h +++ b/sys/compat/linuxkpi/common/include/linux/device.h @@ -514,10 +514,10 @@ device_release_driver(struct device *dev) dev_set_drvdata(dev, NULL); /* Do not call dev->release! */ - mtx_lock(&Giant); + bus_topo_lock(); if (device_is_attached(dev->bsddev)) device_detach(dev->bsddev); - mtx_unlock(&Giant); + bus_topo_unlock(); #endif } @@ -527,9 +527,9 @@ device_reprobe(struct device *dev) int error; device_release_driver(dev); - mtx_lock(&Giant); + bus_topo_lock(); error = device_probe_and_attach(dev->bsddev); - mtx_unlock(&Giant); + bus_topo_unlock(); return (-error); }