KFunc bpf_put_file
This function puts a reference on the supplied file.
Definition
Put a reference on the supplied file
. Only referenced file pointers may be passed to this BPF kfunc. Attempting to pass an unreferenced file pointer, or any other arbitrary pointer for that matter, will result in the BPF program being rejected by the BPF verifier.
This BPF kfunc may only be called from BPF LSM programs.
Parameters
file
: file to put a reference on
Signature
void bpf_put_file(struct file *file)
Note
This kfunc releases the pointer passed in to it. There can be only one referenced pointer that can be passed in. All copies of the pointer being released are invalidated as a result of invoking this kfunc.
Usage
Docs could be improved
This part of the docs is incomplete, contributions are very welcome
Program types
The following program types can make use of this kfunc:
Example
Docs could be improved
This part of the docs is incomplete, contributions are very welcome