aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-06-14 11:28:38 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-06-14 11:28:38 -0700
commitca5432010e45d7f809b441b0c1e85e84b039cd85 (patch)
treeddf8754e813e40ecaa78bcc9ea4c317fc81f9bc1
parent4068b00e9d0542653b26c04dcf05ab0c80bbbbb2 (diff)
parent4e78c724d47e2342aa8fde61f6b8536f662f795f (diff)
downloadkernel_samsung_smdk4412-ca5432010e45d7f809b441b0c1e85e84b039cd85.tar.gz
kernel_samsung_smdk4412-ca5432010e45d7f809b441b0c1e85e84b039cd85.tar.bz2
kernel_samsung_smdk4412-ca5432010e45d7f809b441b0c1e85e84b039cd85.zip
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6: TOMOYO: Fix oops in tomoyo_mount_acl().
-rw-r--r--security/tomoyo/mount.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/security/tomoyo/mount.c b/security/tomoyo/mount.c
index 162a864dba2..9fc2e15841c 100644
--- a/security/tomoyo/mount.c
+++ b/security/tomoyo/mount.c
@@ -138,7 +138,7 @@ static int tomoyo_mount_acl(struct tomoyo_request_info *r, char *dev_name,
}
if (need_dev) {
/* Get mount point or device file. */
- if (kern_path(dev_name, LOOKUP_FOLLOW, &path)) {
+ if (!dev_name || kern_path(dev_name, LOOKUP_FOLLOW, &path)) {
error = -ENOENT;
goto out;
}