* [PATCH]bisected:fs:anon_inodes.c one processor core reads full throttle.
@ 2010-05-25 2:54 Justin P. Mattock
2010-05-25 13:53 ` Eric Paris
0 siblings, 1 reply; 3+ messages in thread
From: Justin P. Mattock @ 2010-05-25 2:54 UTC (permalink / raw)
To: linux-fsdevel; +Cc: viro, eparis, Justin P. Mattock
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-05-25 14:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-25 2:54 [PATCH]bisected:fs:anon_inodes.c one processor core reads full throttle Justin P. Mattock
2010-05-25 13:53 ` Eric Paris
2010-05-25 14:24 ` Justin P. Mattock
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).