From: "Justin P. Mattock" <justinmattock@gmail.com>
To: linux-fsdevel@vger.kernel.org
Cc: viro@zeniv.linux.org.uk, eparis@redhat.com,
"Justin P. Mattock" <justinmattock@gmail.com>
Subject: [PATCH]bisected:fs:anon_inodes.c one processor core reads full throttle.
Date: Mon, 24 May 2010 19:54:37 -0700 [thread overview]
Message-ID: <1274756077-3177-1-git-send-email-justinmattock@gmail.com> (raw)
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 <eparis@redhat.com>
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 <eparis@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
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 <justinmattock@gmail.com>
---
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
next reply other threads:[~2010-05-25 2:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-25 2:54 Justin P. Mattock [this message]
2010-05-25 13:53 ` [PATCH]bisected:fs:anon_inodes.c one processor core reads full throttle Eric Paris
2010-05-25 14:24 ` Justin P. Mattock
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1274756077-3177-1-git-send-email-justinmattock@gmail.com \
--to=justinmattock@gmail.com \
--cc=eparis@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).