projects
/
GitHub
/
LineageOS
/
android_kernel_samsung_universal7580.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
093beac
)
IB/uverbs: Don't leak ref to mm on error path
author
Roland Dreier
<rolandd@cisco.com>
Thu, 18 May 2006 05:20:50 +0000
(22:20 -0700)
committer
Roland Dreier
<rolandd@cisco.com>
Thu, 18 May 2006 05:20:50 +0000
(22:20 -0700)
In ib_umem_release_on_close(), if the kmalloc() fails, then a
reference to current->mm will be leaked. Fix this by adding a mmput()
instead of just returning on kmalloc() failure.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/core/uverbs_mem.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/infiniband/core/uverbs_mem.c
b/drivers/infiniband/core/uverbs_mem.c
index 36a32c315668cebbc7e34be30704b0c4851bcf66..efe147dbeb42137e695298e19c525e1acf027a07 100644
(file)
--- a/
drivers/infiniband/core/uverbs_mem.c
+++ b/
drivers/infiniband/core/uverbs_mem.c
@@
-211,8
+211,10
@@
void ib_umem_release_on_close(struct ib_device *dev, struct ib_umem *umem)
*/
work = kmalloc(sizeof *work, GFP_KERNEL);
- if (!work)
+ if (!work) {
+ mmput(mm);
return;
+ }
INIT_WORK(&work->work, ib_umem_account, work);
work->mm = mm;