[LTP] [PATCH] lsmod01: parse a copy of /proc/modules
Cyril Hrubis
chrubis@suse.cz
Mon Aug 29 17:17:52 CEST 2016
Hi!
Looking into the kernel/module.c the /proc/modules is implemented with
seq_* operations and the list of modules is iterated one by one util
there is a space in buffer. And it looks like the module_mutex is
acquired and released each time we call read(), so there is a chance
that we race against something that loads/unloads kernel modules between
the reads we do. Which would explain why we hit this only under certain
conditions...
But I still do not see how writing to NFS triggers module load/unload or
module refcount increment/decrement. I guess that this would be very
hard to figure out without somebody who is familiar with the nfs code.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list