Re: [PATCH 2/4] modprobe: Fix holders removal

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 29, 2022 at 02:05:37AM -0700, Lucas De Marchi wrote:
> The idea behind --remove-dependencies was to remove other modules that
> depend on the current module being removed. It's the reverse
> dependency list, not the dependency list of the current module: that
> never works since the current module would still hold a ref on it.
> 
> Fix it by replacing the call to kmod_module_get_dependencies() with
> kmod_module_get_holders() when using that option. Also try to cleanup
> the confusion by renaming the option to --remove-holders: "holder" is
> the name used in sysfs and by libkmod to refer to a "live" reverse
> dependency like what we are interested in.
> 
> Before:
> 	./tools/modprobe -D -r --remove-dependencies video
> 	rmmod video
> 
> After:
> 	./tools/modprobe -D -r --remove-holders video
> 	rmmod i915
> 	rmmod thinkpad_acpi
> 	rmmod video
> 
> Signed-off-by: Lucas De Marchi <lucas.demarchi@xxxxxxxxx>

Reviewed-by: Luis Chamberlain <mcgrof@xxxxxxxxxx>

  Luis




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux