]> sourceware.org Git - systemtap.git/commit
Do not use relay_file_operations directly.
authorPrzemyslaw Pawelczyk <przemyslaw@pawelczyk.it>
Thu, 1 Jul 2010 09:30:17 +0000 (11:30 +0200)
committerPrzemyslaw Pawelczyk <przemyslaw@pawelczyk.it>
Thu, 1 Jul 2010 09:30:17 +0000 (11:30 +0200)
commit8af0ed12bb050d38cb655eac6ca19efb9ff959d3
tree2269d1687e969980dbadb9bbad42e06c4ff2d41e
parent8cc799a5dece8e2358037a147458a5f9c3d9727a
Do not use relay_file_operations directly.

Reference counting is important to avoid removing the module while the
file exposing relay channel is being used. SystemTap alone does not need
it, but malicious user may block reloading the module by opening such
file and stap user won't notice it during unloading.

relay_file_operations defined and exported in kernel/relay.c is const
and .owner is obviously not set there, hence it shouldn't be used
directly by any kernel module.

Add relay_file_operations_w_owner and use it instead of mentioned one to
fix 'trace' file handling w.r.t. module unloading.

* runtime/transport/relay_v2.c: Add owner to the trace file.
runtime/transport/relay_v2.c
This page took 0.027306 seconds and 5 git commands to generate.