projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
247ec9b
)
cifs: add check for kmalloc in parse_dacl
author
Stanislav Fomichev
<kernel@fomichev.me>
Sat, 5 Feb 2011 23:05:28 +0000
(
02:05
+0300)
committer
Steve French
<sfrench@us.ibm.com>
Sun, 6 Feb 2011 00:36:23 +0000
(
00:36
+0000)
Exit from parse_dacl if no memory returned from the call to kmalloc.
Signed-off-by: Stanislav Fomichev <kernel@fomichev.me>
Signed-off-by: Steve French <sfrench@us.ibm.com>
fs/cifs/cifsacl.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/cifs/cifsacl.c
b/fs/cifs/cifsacl.c
index 1e7636b145a88a180c8459f65bf86d51d6c165f6..beeebf194234c4532341eaea45c316fe6cb58c3f 100644
(file)
--- a/
fs/cifs/cifsacl.c
+++ b/
fs/cifs/cifsacl.c
@@
-372,6
+372,10
@@
static void parse_dacl(struct cifs_acl *pdacl, char *end_of_acl,
ppace = kmalloc(num_aces * sizeof(struct cifs_ace *),
GFP_KERNEL);
+ if (!ppace) {
+ cERROR(1, "DACL memory allocation error");
+ return;
+ }
for (i = 0; i < num_aces; ++i) {
ppace[i] = (struct cifs_ace *) (acl_base + acl_size);