From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Justin P. Mattock" Subject: [PATCH]bisected:fs:anon_inodes.c one processor core reads full throttle. Date: Mon, 24 May 2010 19:54:37 -0700 Message-ID: <1274756077-3177-1-git-send-email-justinmattock@gmail.com> Cc: viro@zeniv.linux.org.uk, eparis@redhat.com, "Justin P. Mattock" To: linux-fsdevel@vger.kernel.org Return-path: Received: from mail-pv0-f174.google.com ([74.125.83.174]:48270 "EHLO mail-pv0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755471Ab0EYCy4 (ORCPT ); Mon, 24 May 2010 22:54:56 -0400 Received: by pvg3 with SMTP id 3so334862pvg.19 for ; Mon, 24 May 2010 19:54:55 -0700 (PDT) Sender: linux-fsdevel-owner@vger.kernel.org List-ID: I have no idea why this is doing this., but when doing watch cat /proc/cpuinfo I see one of my cores reading full throttle. The bisect results are this: a7cf4145bb86aaf85d4d4d29a69b50b688e2e49d is the first bad commit commit a7cf4145bb86aaf85d4d4d29a69b50b688e2e49d Author: Eric Paris Date: Fri May 14 11:44:10 2010 -0400 anon_inode: set S_IFREG on the anon_inode anon_inode_mkinode() sets inode->i_mode = S_IRUSR | S_IWUSR; This means that (inode->i_mode & S_IFMT) == 0. This trips up some SELinux code that needs to determine if a given inode is a regular file, a directory, etc. The easiest solution is to just make sure that the anon_inode also sets S_IFREG. Signed-off-by: Eric Paris Signed-off-by: Al Viro doing a git revert a7cf4145 gets cpuinfo to show both cores running as they should.(both iMac, and macbookpro hit this). I looked at the manual for fstat, and am not understanding how S_IFREG(standard file) can cause such and issue. Below(after reading the man), was the only other option I can make out(other than FIFO)to use to fix this issue. either using S_IFMT is a good solution, or it's not (I'm not sure at the moment),let me know. Signed-off-by: Justin P. Mattock --- fs/anon_inodes.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/anon_inodes.c b/fs/anon_inodes.c index 9bd4b38..8ac1693 100644 --- a/fs/anon_inodes.c +++ b/fs/anon_inodes.c @@ -205,7 +205,7 @@ static struct inode *anon_inode_mkinode(void) * that it already _is_ on the dirty list. */ inode->i_state = I_DIRTY; - inode->i_mode = S_IFREG | S_IRUSR | S_IWUSR; + inode->i_mode = S_IFMT | S_IRUSR | S_IWUSR; inode->i_uid = current_fsuid(); inode->i_gid = current_fsgid(); inode->i_flags |= S_PRIVATE; -- 1.6.5.GIT