PR10000: emit _stp_relocate* calculations correctly for kernel/module global $data

Frank Ch. Eigler fche@redhat.com
Mon Apr 20 16:13:00 GMT 2009


Roland McGrath <roland@redhat.com> writes:

>>[...]
> Also, find_module is exported, for looking up by name.

... but that is designed to run with module_mutex held, which was only
only recently module-exported, so using it generally incurs a race
condition.  (Many moons ago we requested a get_module_byname() to
solve this but lkml people said no.)

> Every module can access its own struct module * with THIS_MODULE.
> So a stap-generated module can do this.  You can start with your
> own, and iterate over the list that links them all together [...]

I seem to recall some other problem (portability? locking?) with this
approach.

- FChE



More information about the Systemtap mailing list