From: James Morris Date: Sun, 28 Feb 2010 22:36:31 +0000 (+1100) Subject: Merge branch 'next' into for-linus X-Git-Tag: upstream/snapshot3+hdmi~15531^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b4ccebdd37ff70d349321a198f416ba737a5e833;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git Merge branch 'next' into for-linus --- b4ccebdd37ff70d349321a198f416ba737a5e833 diff --cc security/tomoyo/tomoyo.c index 2aceebf,c94e35c..dedd97d --- a/security/tomoyo/tomoyo.c +++ b/security/tomoyo/tomoyo.c @@@ -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,