aboutsummaryrefslogtreecommitdiffstats
path: root/fs/isofs
diff options
context:
space:
mode:
authorWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2015-10-22 21:26:58 +0200
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2015-10-22 21:26:58 +0200
commit786208aedd8f75b0720e36b2ca66b3a411417301 (patch)
treee6e902ab383ca94842c8691a9e28e1a6aefc5695 /fs/isofs
parentb99374450c03bf5081b88995d91d34fb9b2fd040 (diff)
downloadkernel_samsung_smdk4412-786208aedd8f75b0720e36b2ca66b3a411417301.zip
kernel_samsung_smdk4412-786208aedd8f75b0720e36b2ca66b3a411417301.tar.gz
kernel_samsung_smdk4412-786208aedd8f75b0720e36b2ca66b3a411417301.tar.bz2
merged 3.0.101 tag
Diffstat (limited to 'fs/isofs')
-rw-r--r--fs/isofs/export.c1
-rw-r--r--fs/isofs/inode.c16
2 files changed, 6 insertions, 11 deletions
diff --git a/fs/isofs/export.c b/fs/isofs/export.c
index 516eb21..fd88add 100644
--- a/fs/isofs/export.c
+++ b/fs/isofs/export.c
@@ -135,6 +135,7 @@ isofs_export_encode_fh(struct dentry *dentry,
len = 3;
fh32[0] = ei->i_iget5_block;
fh16[2] = (__u16)ei->i_iget5_offset; /* fh16 [sic] */
+ fh16[3] = 0; /* avoid leaking uninitialized data */
fh32[2] = inode->i_generation;
if (connectable && !S_ISDIR(inode->i_mode)) {
struct inode *parent;
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c
index b3cc858..26f6364 100644
--- a/fs/isofs/inode.c
+++ b/fs/isofs/inode.c
@@ -119,8 +119,8 @@ static void destroy_inodecache(void)
static int isofs_remount(struct super_block *sb, int *flags, char *data)
{
- /* we probably want a lot more here */
- *flags |= MS_RDONLY;
+ if (!(*flags & MS_RDONLY))
+ return -EROFS;
return 0;
}
@@ -769,15 +769,6 @@ root_found:
*/
s->s_maxbytes = 0x80000000000LL;
- /*
- * The CDROM is read-only, has no nodes (devices) on it, and since
- * all of the files appear to be owned by root, we really do not want
- * to allow suid. (suid or devices will not show up unless we have
- * Rock Ridge extensions)
- */
-
- s->s_flags |= MS_RDONLY /* | MS_NODEV | MS_NOSUID */;
-
/* Set this for reference. Its not currently used except on write
which we don't have .. */
@@ -1528,6 +1519,9 @@ struct inode *isofs_iget(struct super_block *sb,
static struct dentry *isofs_mount(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
+ /* We don't support read-write mounts */
+ if (!(flags & MS_RDONLY))
+ return ERR_PTR(-EACCES);
return mount_bdev(fs_type, flags, dev_name, data, isofs_fill_super);
}