projects/linux·commit ca543201

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6

ca543201 · Linus Torvalds <[email protected]> · 2011-06-14 11:28:38 -07:00

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
  TOMOYO: Fix oops in tomoyo_mount_acl().
Commit
ca5432010e45d7f809b441b0c1e85e84b039cd85
Parents
4068b00e · 4e78c724

Merge commit. Changes below are compared with the first parent: 4068b00e.

Changes

1 files changed · +1 −1

FileStatusAddDelContent
security/tomoyo/mount.cmodified+1−1View file

security/tomoyo/mount.c

View file
diff --git a/security/tomoyo/mount.c b/security/tomoyo/mount.c
index 162a864..9fc2e15 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;
}