git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
fs
/
binfmt_misc.c
diff --git
a/fs/binfmt_misc.c
b/fs/binfmt_misc.c
index
8ae0db6
..
d73d755
100644
(file)
--- a/
fs/binfmt_misc.c
+++ b/
fs/binfmt_misc.c
@@
-150,7
+150,7
@@
static int load_misc_binary(struct linux_binprm *bprm, struct pt_regs *regs)
/* if the binary is not readable than enforce mm->dumpable=0
regardless of the interpreter's permissions */
/* if the binary is not readable than enforce mm->dumpable=0
regardless of the interpreter's permissions */
- if (
permission(bprm->file->f_dentry->d_inode, MAY_READ, NULL
))
+ if (
file_permission(bprm->file, MAY_READ
))
bprm->interp_flags |= BINPRM_FLAGS_ENFORCE_NONDUMP;
allow_write_access(bprm->file);
bprm->interp_flags |= BINPRM_FLAGS_ENFORCE_NONDUMP;
allow_write_access(bprm->file);
@@
-264,7
+264,7
@@
static int unquote(char *from)
return p - from;
}
return p - from;
}
-static
inline
char * check_special_flags (char * sfs, Node * e)
+static char * check_special_flags (char * sfs, Node * e)
{
char * p = sfs;
int cont = 1;
{
char * p = sfs;
int cont = 1;
@@
-588,11
+588,11
@@
static ssize_t bm_entry_write(struct file *file, const char __user *buffer,
case 2: set_bit(Enabled, &e->flags);
break;
case 3: root = dget(file->f_vfsmnt->mnt_sb->s_root);
case 2: set_bit(Enabled, &e->flags);
break;
case 3: root = dget(file->f_vfsmnt->mnt_sb->s_root);
-
down(&root->d_inode->i_sem
);
+
mutex_lock(&root->d_inode->i_mutex
);
kill_node(e);
kill_node(e);
-
up(&root->d_inode->i_sem
);
+
mutex_unlock(&root->d_inode->i_mutex
);
dput(root);
break;
default: return res;
dput(root);
break;
default: return res;
@@
-600,7
+600,7
@@
static ssize_t bm_entry_write(struct file *file, const char __user *buffer,
return count;
}
return count;
}
-static struct file_operations bm_entry_operations = {
+static
const
struct file_operations bm_entry_operations = {
.read = bm_entry_read,
.write = bm_entry_write,
};
.read = bm_entry_read,
.write = bm_entry_write,
};
@@
-622,7
+622,7
@@
static ssize_t bm_register_write(struct file *file, const char __user *buffer,
return PTR_ERR(e);
root = dget(sb->s_root);
return PTR_ERR(e);
root = dget(sb->s_root);
-
down(&root->d_inode->i_sem
);
+
mutex_lock(&root->d_inode->i_mutex
);
dentry = lookup_one_len(e->name, root, strlen(e->name));
err = PTR_ERR(dentry);
if (IS_ERR(dentry))
dentry = lookup_one_len(e->name, root, strlen(e->name));
err = PTR_ERR(dentry);
if (IS_ERR(dentry))
@@
-658,7
+658,7
@@
static ssize_t bm_register_write(struct file *file, const char __user *buffer,
out2:
dput(dentry);
out:
out2:
dput(dentry);
out:
-
up(&root->d_inode->i_sem
);
+
mutex_unlock(&root->d_inode->i_mutex
);
dput(root);
if (err) {
dput(root);
if (err) {
@@
-668,7
+668,7
@@
out:
return count;
}
return count;
}
-static struct file_operations bm_register_operations = {
+static
const
struct file_operations bm_register_operations = {
.write = bm_register_write,
};
.write = bm_register_write,
};
@@
-703,19
+703,19
@@
static ssize_t bm_status_write(struct file * file, const char __user * buffer,
case 1: enabled = 0; break;
case 2: enabled = 1; break;
case 3: root = dget(file->f_vfsmnt->mnt_sb->s_root);
case 1: enabled = 0; break;
case 2: enabled = 1; break;
case 3: root = dget(file->f_vfsmnt->mnt_sb->s_root);
-
down(&root->d_inode->i_sem
);
+
mutex_lock(&root->d_inode->i_mutex
);
while (!list_empty(&entries))
kill_node(list_entry(entries.next, Node, list));
while (!list_empty(&entries))
kill_node(list_entry(entries.next, Node, list));
-
up(&root->d_inode->i_sem
);
+
mutex_unlock(&root->d_inode->i_mutex
);
dput(root);
default: return res;
}
return count;
}
dput(root);
default: return res;
}
return count;
}
-static struct file_operations bm_status_operations = {
+static
const
struct file_operations bm_status_operations = {
.read = bm_status_read,
.write = bm_status_write,
};
.read = bm_status_read,
.write = bm_status_write,
};