Merge branch 'next' into for-linus
authorJames Morris <jmorris@namei.org>
Sun, 28 Feb 2010 22:36:31 +0000 (09:36 +1100)
committerJames Morris <jmorris@namei.org>
Sun, 28 Feb 2010 22:36:31 +0000 (09:36 +1100)
1  2 
kernel/printk.c
security/security.c
security/tomoyo/tomoyo.c

diff --cc kernel/printk.c
Simple merge
Simple merge
@@@ -76,12 -84,17 +84,16 @@@ static int tomoyo_bprm_check_security(s
         * Execute permission is checked against pathname passed to do_execve()
         * using current domain.
         */
-       if (!domain)
-               return tomoyo_find_next_domain(bprm);
+       if (!domain) {
+               const int idx = tomoyo_read_lock();
+               const int err = tomoyo_find_next_domain(bprm);
+               tomoyo_read_unlock(idx);
+               return err;
+       }
        /*
         * Read permission is checked against interpreters using next domain.
 -       * '1' is the result of open_to_namei_flags(O_RDONLY).
         */
 -      return tomoyo_check_open_permission(domain, &bprm->file->f_path, 1);
 +      return tomoyo_check_open_permission(domain, &bprm->file->f_path, O_RDONLY);
  }
  
  static int tomoyo_path_truncate(struct path *path, loff_t length,