[PATCH]bisected:fs:anon_inodes.c one processor core reads full throttle.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
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@xxxxxxxxxx>
    Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx>


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@xxxxxxxxx>

---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux