[LTP] [PATCH v3] madvise11.c:Check loadable module before rmmod
Cyril Hrubis
chrubis@suse.cz
Tue Mar 14 09:15:05 CET 2023
Hi!
> This is caused by "_" and "-", current search function not do this tricky translate part.
> Input parameter is hwpoison_inject but actually string in modules.xxx is hwpoison-inject
>
> /lib/modules/5.14.21-150400.24.41-default/modules.dep | grep hwpo
> kernel/mm/hwpoison-inject.ko.zst:
>
> Other info just FYI:
> //modprobe can accept both "-" and "_"
> localhost:/home/ltp # modprobe hwpoison-inject
> localhost:/home/ltp # modprobe hwpoison_inject
>
> //get info from lsmod and /proc use "_"
> localhost:/home/ltp # lsmod | grep hwpo
> hwpoison_inject 16384 0
> localhost:/home/ltp # cat /proc/modules | grep hwp
> hwpoison_inject 16384 0 - Live 0xffffffffc09d6000
Sounds like a bug that shoudl be fixed, we probably need to create two
search strings, one with dashes and one with underscores and try to
strstr() both.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list