[LTP] [PATCH v3] madvise11.c:Check loadable module before rmmod
Richard Palethorpe
rpalethorpe@suse.de
Tue Mar 14 09:49:18 CET 2023
Hello,
Cyril Hrubis <chrubis@suse.cz> writes:
> 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.
Could we not check kconfig for builtin modules?
I suppose this would require an extension to tst_kconfig, but the
information is there already.
>
> --
> Cyril Hrubis
> chrubis@suse.cz
--
Thank you,
Richard.
More information about the ltp
mailing list