diff options
author | Sumit Semwal <sumit.semwal@linaro.org> | 2015-05-05 11:26:15 +0200 |
---|---|---|
committer | Sumit Semwal <sumit.semwal@linaro.org> | 2015-05-13 11:05:57 +0200 |
commit | 9abdffe286c1532a54d5aee31571d3029be4026c (patch) | |
tree | 9a2651def7b2ffea3b4fcb78b8ec0a38e460ab46 /drivers/dma-buf/reservation.c | |
parent | Linux 4.1-rc2 (diff) | |
download | linux-9abdffe286c1532a54d5aee31571d3029be4026c.tar.xz linux-9abdffe286c1532a54d5aee31571d3029be4026c.zip |
dma-buf: add ref counting for module as exporter
Add reference counting on a kernel module that exports dma-buf and
implements its operations. This prevents the module from being unloaded
while DMABUF file is in use.
The original patch [1] was submitted by Tomasz Stanislawski, but this
is a simpler way to do it.
v3: call module_put() as late as possible, per gregkh's comment.
v2: move owner to struct dma_buf, and use DEFINE_DMA_BUF_EXPORT_INFO
macro to simplify the change.
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
[1]: https://lkml.org/lkml/2012/8/8/163
Diffstat (limited to 'drivers/dma-buf/reservation.c')
0 files changed, 0 insertions, 0 deletions