projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
683be16
)
Btrfs: handle kmalloc() failure in inode lookup ioctl
author
Dan Carpenter
<error27@gmail.com>
Sat, 20 Mar 2010 11:24:15 +0000
(11:24 +0000)
committer
Chris Mason
<chris.mason@oracle.com>
Wed, 31 Mar 2010 01:19:09 +0000
(21:19 -0400)
Return -ENOMEM if kmalloc() fails.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/ioctl.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/btrfs/ioctl.c
b/fs/btrfs/ioctl.c
index 874d36e5f167eb879207fe78b56116f1402868b0..74d89133f76866786c3df6c19a48000fd51674e5 100644
(file)
--- a/
fs/btrfs/ioctl.c
+++ b/
fs/btrfs/ioctl.c
@@
-1211,6
+1211,9
@@
static noinline int btrfs_ioctl_ino_lookup(struct file *file,
return -EPERM;
args = kmalloc(sizeof(*args), GFP_KERNEL);
+ if (!args)
+ return -ENOMEM;
+
if (copy_from_user(args, argp, sizeof(*args))) {
kfree(args);
return -EFAULT;