debugfs: lockdown: Allow reading debugfs files that are not world readable
[linux-2.6-microblaze.git] / fs / debugfs / file.c
index 7d162b0..950c63f 100644 (file)
@@ -147,7 +147,7 @@ static int debugfs_locked_down(struct inode *inode,
                               struct file *filp,
                               const struct file_operations *real_fops)
 {
-       if ((inode->i_mode & 07777) == 0444 &&
+       if ((inode->i_mode & 07777 & ~0444) == 0 &&
            !(filp->f_mode & FMODE_WRITE) &&
            !real_fops->unlocked_ioctl &&
            !real_fops->compat_ioctl &&