Date: Sun, 26 Dec 2021 03:02:48 GMT From: Alexander Motin <mav@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 27ac2b2d4970 - main - LinuxKPI: Replace missed Giant with bus_topo_lock. Message-ID: <202112260302.1BQ32mxN021544@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=27ac2b2d49706561ea5d917d77fd6b0a07cb72f8 commit 27ac2b2d49706561ea5d917d77fd6b0a07cb72f8 Author: Alexander Motin <mav@FreeBSD.org> AuthorDate: 2021-12-26 03:02:07 +0000 Commit: Alexander Motin <mav@FreeBSD.org> 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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202112260302.1BQ32mxN021544>