Skip to content
Snippets Groups Projects
Commit 755198dd authored by Corey Minyard's avatar Corey Minyard Committed by Yang Yingliang
Browse files

ipmi: Don't allow device module unload when in use


[ Upstream commit cbb79863 ]

If something has the IPMI driver open, don't allow the device
module to be unloaded.  Before it would unload and the user would
get errors on use.

This change is made on user request, and it makes it consistent
with the I2C driver, which has the same behavior.

It does change things a little bit with respect to kernel users.
If the ACPI or IPMI watchdog (or any other kernel user) has
created a user, then the device module cannot be unloaded.  Before
it could be unloaded,

This does not affect hot-plug.  If the device goes away (it's on
something removable that is removed or is hot-removed via sysfs)
then it still behaves as it did before.

Reported-by: default avatartony camuso <tcamuso@redhat.com>
Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
Tested-by: default avatartony camuso <tcamuso@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 41cff649
No related branches found
No related tags found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment