Skip to content

Commit 7293261

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace
Pull namespace bugfixes from Eric Biederman: "This is three simple fixes against 3.9-rc1. I have tested each of these fixes and verified they work correctly. The userns oops in key_change_session_keyring and the BUG_ON triggered by proc_ns_follow_link were found by Dave Jones. I am including the enhancement for mount to only trigger requests of filesystem modules here instead of delaying this for the 3.10 merge window because it is both trivial and the kind of change that tends to bit-rot if left untouched for two months." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace: proc: Use nd_jump_link in proc_ns_follow_link fs: Limit sys_mount to only request filesystem modules (Part 2). fs: Limit sys_mount to only request filesystem modules. userns: Stop oopsing in key_change_session_keyring
2 parents 8343bce + db04dc6 commit 7293261

File tree

71 files changed

+84
-19
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+84
-19
lines changed

arch/ia64/kernel/perfmon.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,7 @@ static struct file_system_type pfm_fs_type = {
619619
.mount = pfmfs_mount,
620620
.kill_sb = kill_anon_super,
621621
};
622+
MODULE_ALIAS_FS("pfmfs");
622623

623624
DEFINE_PER_CPU(unsigned long, pfm_syst_info);
624625
DEFINE_PER_CPU(struct task_struct *, pmu_owner);

arch/powerpc/platforms/cell/spufs/inode.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,6 +749,7 @@ static struct file_system_type spufs_type = {
749749
.mount = spufs_mount,
750750
.kill_sb = kill_litter_super,
751751
};
752+
MODULE_ALIAS_FS("spufs");
752753

753754
static int __init spufs_init(void)
754755
{

arch/s390/hypfs/inode.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@ static struct file_system_type hypfs_type = {
456456
.mount = hypfs_mount,
457457
.kill_sb = hypfs_kill_super
458458
};
459+
MODULE_ALIAS_FS("s390_hypfs");
459460

460461
static const struct super_operations hypfs_s_ops = {
461462
.statfs = simple_statfs,

drivers/firmware/efivars.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1289,6 +1289,7 @@ static struct file_system_type efivarfs_type = {
12891289
.mount = efivarfs_mount,
12901290
.kill_sb = efivarfs_kill_sb,
12911291
};
1292+
MODULE_ALIAS_FS("efivarfs");
12921293

12931294
/*
12941295
* Handle negative dentry.

drivers/infiniband/hw/ipath/ipath_fs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,7 @@ static struct file_system_type ipathfs_fs_type = {
410410
.mount = ipathfs_mount,
411411
.kill_sb = ipathfs_kill_super,
412412
};
413+
MODULE_ALIAS_FS("ipathfs");
413414

414415
int __init ipath_init_ipathfs(void)
415416
{

drivers/infiniband/hw/qib/qib_fs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,7 @@ static struct file_system_type qibfs_fs_type = {
604604
.mount = qibfs_mount,
605605
.kill_sb = qibfs_kill_super,
606606
};
607+
MODULE_ALIAS_FS("ipathfs");
607608

608609
int __init qib_init_qibfs(void)
609610
{

drivers/misc/ibmasm/ibmasmfs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ static struct file_system_type ibmasmfs_type = {
110110
.mount = ibmasmfs_mount,
111111
.kill_sb = kill_litter_super,
112112
};
113+
MODULE_ALIAS_FS("ibmasmfs");
113114

114115
static int ibmasmfs_fill_super (struct super_block *sb, void *data, int silent)
115116
{

drivers/mtd/mtdchar.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,6 +1238,7 @@ static struct file_system_type mtd_inodefs_type = {
12381238
.mount = mtd_inodefs_mount,
12391239
.kill_sb = kill_anon_super,
12401240
};
1241+
MODULE_ALIAS_FS("mtd_inodefs");
12411242

12421243
static int __init init_mtdchar(void)
12431244
{

drivers/oprofile/oprofilefs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ static struct file_system_type oprofilefs_type = {
276276
.mount = oprofilefs_mount,
277277
.kill_sb = kill_litter_super,
278278
};
279+
MODULE_ALIAS_FS("oprofilefs");
279280

280281

281282
int __init oprofilefs_register(void)

drivers/staging/ccg/f_fs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,6 +1223,7 @@ static struct file_system_type ffs_fs_type = {
12231223
.mount = ffs_fs_mount,
12241224
.kill_sb = ffs_fs_kill_sb,
12251225
};
1226+
MODULE_ALIAS_FS("functionfs");
12261227

12271228

12281229
/* Driver's main init/cleanup functions *************************************/

drivers/usb/gadget/f_fs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,6 +1235,7 @@ static struct file_system_type ffs_fs_type = {
12351235
.mount = ffs_fs_mount,
12361236
.kill_sb = ffs_fs_kill_sb,
12371237
};
1238+
MODULE_ALIAS_FS("functionfs");
12381239

12391240

12401241
/* Driver's main init/cleanup functions *************************************/

drivers/usb/gadget/inode.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2105,6 +2105,7 @@ static struct file_system_type gadgetfs_type = {
21052105
.mount = gadgetfs_mount,
21062106
.kill_sb = gadgetfs_kill_sb,
21072107
};
2108+
MODULE_ALIAS_FS("gadgetfs");
21082109

21092110
/*----------------------------------------------------------------------*/
21102111

drivers/xen/xenfs/super.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ static struct file_system_type xenfs_type = {
7575
.mount = xenfs_mount,
7676
.kill_sb = kill_litter_super,
7777
};
78+
MODULE_ALIAS_FS("xenfs");
7879

7980
static int __init xenfs_init(void)
8081
{

fs/9p/vfs_super.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,3 +365,4 @@ struct file_system_type v9fs_fs_type = {
365365
.owner = THIS_MODULE,
366366
.fs_flags = FS_RENAME_DOES_D_MOVE,
367367
};
368+
MODULE_ALIAS_FS("9p");

fs/adfs/super.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,7 @@ static struct file_system_type adfs_fs_type = {
524524
.kill_sb = kill_block_super,
525525
.fs_flags = FS_REQUIRES_DEV,
526526
};
527+
MODULE_ALIAS_FS("adfs");
527528

528529
static int __init init_adfs_fs(void)
529530
{

fs/affs/super.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,7 @@ static struct file_system_type affs_fs_type = {
622622
.kill_sb = kill_block_super,
623623
.fs_flags = FS_REQUIRES_DEV,
624624
};
625+
MODULE_ALIAS_FS("affs");
625626

626627
static int __init init_affs_fs(void)
627628
{

fs/afs/super.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ struct file_system_type afs_fs_type = {
4545
.kill_sb = afs_kill_super,
4646
.fs_flags = 0,
4747
};
48+
MODULE_ALIAS_FS("afs");
4849

4950
static const struct super_operations afs_super_ops = {
5051
.statfs = afs_statfs,

fs/autofs4/init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ static struct file_system_type autofs_fs_type = {
2626
.mount = autofs_mount,
2727
.kill_sb = autofs4_kill_sb,
2828
};
29+
MODULE_ALIAS_FS("autofs");
2930

3031
static int __init init_autofs4_fs(void)
3132
{

fs/befs/linuxvfs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,7 @@ static struct file_system_type befs_fs_type = {
951951
.kill_sb = kill_block_super,
952952
.fs_flags = FS_REQUIRES_DEV,
953953
};
954+
MODULE_ALIAS_FS("befs");
954955

955956
static int __init
956957
init_befs_fs(void)

fs/bfs/inode.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,7 @@ static struct file_system_type bfs_fs_type = {
473473
.kill_sb = kill_block_super,
474474
.fs_flags = FS_REQUIRES_DEV,
475475
};
476+
MODULE_ALIAS_FS("bfs");
476477

477478
static int __init init_bfs_fs(void)
478479
{

fs/binfmt_misc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,7 @@ static struct file_system_type bm_fs_type = {
720720
.mount = bm_mount,
721721
.kill_sb = kill_litter_super,
722722
};
723+
MODULE_ALIAS_FS("binfmt_misc");
723724

724725
static int __init init_misc_binfmt(void)
725726
{

fs/btrfs/super.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1558,6 +1558,7 @@ static struct file_system_type btrfs_fs_type = {
15581558
.kill_sb = btrfs_kill_super,
15591559
.fs_flags = FS_REQUIRES_DEV,
15601560
};
1561+
MODULE_ALIAS_FS("btrfs");
15611562

15621563
/*
15631564
* used by btrfsctl to scan devices when no FS is mounted

fs/ceph/super.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -952,6 +952,7 @@ static struct file_system_type ceph_fs_type = {
952952
.kill_sb = ceph_kill_sb,
953953
.fs_flags = FS_RENAME_DOES_D_MOVE,
954954
};
955+
MODULE_ALIAS_FS("ceph");
955956

956957
#define _STRINGIFY(x) #x
957958
#define STRINGIFY(x) _STRINGIFY(x)

fs/coda/inode.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,4 +329,5 @@ struct file_system_type coda_fs_type = {
329329
.kill_sb = kill_anon_super,
330330
.fs_flags = FS_BINARY_MOUNTDATA,
331331
};
332+
MODULE_ALIAS_FS("coda");
332333

fs/configfs/mount.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ static struct file_system_type configfs_fs_type = {
114114
.mount = configfs_do_mount,
115115
.kill_sb = kill_litter_super,
116116
};
117+
MODULE_ALIAS_FS("configfs");
117118

118119
struct dentry *configfs_pin_fs(void)
119120
{

fs/cramfs/inode.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,7 @@ static struct file_system_type cramfs_fs_type = {
573573
.kill_sb = kill_block_super,
574574
.fs_flags = FS_REQUIRES_DEV,
575575
};
576+
MODULE_ALIAS_FS("cramfs");
576577

577578
static int __init init_cramfs_fs(void)
578579
{

fs/debugfs/inode.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ static struct file_system_type debug_fs_type = {
299299
.mount = debug_mount,
300300
.kill_sb = kill_litter_super,
301301
};
302+
MODULE_ALIAS_FS("debugfs");
302303

303304
static struct dentry *__create_file(const char *name, umode_t mode,
304305
struct dentry *parent, void *data,

fs/ecryptfs/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -629,6 +629,7 @@ static struct file_system_type ecryptfs_fs_type = {
629629
.kill_sb = ecryptfs_kill_block_super,
630630
.fs_flags = 0
631631
};
632+
MODULE_ALIAS_FS("ecryptfs");
632633

633634
/**
634635
* inode_info_init_once

fs/efs/super.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ static struct file_system_type efs_fs_type = {
3333
.kill_sb = kill_block_super,
3434
.fs_flags = FS_REQUIRES_DEV,
3535
};
36+
MODULE_ALIAS_FS("efs");
3637

3738
static struct pt_types sgi_pt_types[] = {
3839
{0x00, "SGI vh"},

fs/exofs/super.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,6 +1010,7 @@ static struct file_system_type exofs_type = {
10101010
.mount = exofs_mount,
10111011
.kill_sb = generic_shutdown_super,
10121012
};
1013+
MODULE_ALIAS_FS("exofs");
10131014

10141015
static int __init init_exofs(void)
10151016
{

fs/ext2/super.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1536,6 +1536,7 @@ static struct file_system_type ext2_fs_type = {
15361536
.kill_sb = kill_block_super,
15371537
.fs_flags = FS_REQUIRES_DEV,
15381538
};
1539+
MODULE_ALIAS_FS("ext2");
15391540

15401541
static int __init init_ext2_fs(void)
15411542
{

fs/ext3/super.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3068,6 +3068,7 @@ static struct file_system_type ext3_fs_type = {
30683068
.kill_sb = kill_block_super,
30693069
.fs_flags = FS_REQUIRES_DEV,
30703070
};
3071+
MODULE_ALIAS_FS("ext3");
30713072

30723073
static int __init init_ext3_fs(void)
30733074
{

fs/ext4/super.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ static struct file_system_type ext2_fs_type = {
9090
.kill_sb = kill_block_super,
9191
.fs_flags = FS_REQUIRES_DEV,
9292
};
93+
MODULE_ALIAS_FS("ext2");
9394
#define IS_EXT2_SB(sb) ((sb)->s_bdev->bd_holder == &ext2_fs_type)
9495
#else
9596
#define IS_EXT2_SB(sb) (0)
@@ -104,6 +105,7 @@ static struct file_system_type ext3_fs_type = {
104105
.kill_sb = kill_block_super,
105106
.fs_flags = FS_REQUIRES_DEV,
106107
};
108+
MODULE_ALIAS_FS("ext3");
107109
#define IS_EXT3_SB(sb) ((sb)->s_bdev->bd_holder == &ext3_fs_type)
108110
#else
109111
#define IS_EXT3_SB(sb) (0)
@@ -5152,7 +5154,6 @@ static inline int ext2_feature_set_ok(struct super_block *sb)
51525154
return 0;
51535155
return 1;
51545156
}
5155-
MODULE_ALIAS("ext2");
51565157
#else
51575158
static inline void register_as_ext2(void) { }
51585159
static inline void unregister_as_ext2(void) { }
@@ -5185,7 +5186,6 @@ static inline int ext3_feature_set_ok(struct super_block *sb)
51855186
return 0;
51865187
return 1;
51875188
}
5188-
MODULE_ALIAS("ext3");
51895189
#else
51905190
static inline void register_as_ext3(void) { }
51915191
static inline void unregister_as_ext3(void) { }
@@ -5199,6 +5199,7 @@ static struct file_system_type ext4_fs_type = {
51995199
.kill_sb = kill_block_super,
52005200
.fs_flags = FS_REQUIRES_DEV,
52015201
};
5202+
MODULE_ALIAS_FS("ext4");
52025203

52035204
static int __init ext4_init_feat_adverts(void)
52045205
{

fs/f2fs/super.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,7 @@ static struct file_system_type f2fs_fs_type = {
687687
.kill_sb = kill_block_super,
688688
.fs_flags = FS_REQUIRES_DEV,
689689
};
690+
MODULE_ALIAS_FS("f2fs");
690691

691692
static int __init init_inodecache(void)
692693
{

fs/fat/namei_msdos.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,7 @@ static struct file_system_type msdos_fs_type = {
668668
.kill_sb = kill_block_super,
669669
.fs_flags = FS_REQUIRES_DEV,
670670
};
671+
MODULE_ALIAS_FS("msdos");
671672

672673
static int __init init_msdos_fs(void)
673674
{

fs/fat/namei_vfat.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,6 +1073,7 @@ static struct file_system_type vfat_fs_type = {
10731073
.kill_sb = kill_block_super,
10741074
.fs_flags = FS_REQUIRES_DEV,
10751075
};
1076+
MODULE_ALIAS_FS("vfat");
10761077

10771078
static int __init init_vfat_fs(void)
10781079
{

fs/filesystems.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ struct file_system_type *get_fs_type(const char *name)
273273
int len = dot ? dot - name : strlen(name);
274274

275275
fs = __get_fs_type(name, len);
276-
if (!fs && (request_module("%.*s", len, name) == 0))
276+
if (!fs && (request_module("fs-%.*s", len, name) == 0))
277277
fs = __get_fs_type(name, len);
278278

279279
if (dot && fs && !(fs->fs_flags & FS_HAS_SUBTYPE)) {

fs/freevxfs/vxfs_super.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ MODULE_AUTHOR("Christoph Hellwig");
5252
MODULE_DESCRIPTION("Veritas Filesystem (VxFS) driver");
5353
MODULE_LICENSE("Dual BSD/GPL");
5454

55-
MODULE_ALIAS("vxfs"); /* makes mount -t vxfs autoload the module */
5655

5756

5857
static void vxfs_put_super(struct super_block *);
@@ -258,6 +257,7 @@ static struct file_system_type vxfs_fs_type = {
258257
.kill_sb = kill_block_super,
259258
.fs_flags = FS_REQUIRES_DEV,
260259
};
260+
MODULE_ALIAS_FS("vxfs"); /* makes mount -t vxfs autoload the module */
261261

262262
static int __init
263263
vxfs_init(void)

fs/fuse/control.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ static struct file_system_type fuse_ctl_fs_type = {
341341
.mount = fuse_ctl_mount,
342342
.kill_sb = fuse_ctl_kill_sb,
343343
};
344+
MODULE_ALIAS_FS("fusectl");
344345

345346
int __init fuse_ctl_init(void)
346347
{

fs/fuse/inode.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,6 +1117,7 @@ static struct file_system_type fuse_fs_type = {
11171117
.mount = fuse_mount,
11181118
.kill_sb = fuse_kill_sb_anon,
11191119
};
1120+
MODULE_ALIAS_FS("fuse");
11201121

11211122
#ifdef CONFIG_BLOCK
11221123
static struct dentry *fuse_mount_blk(struct file_system_type *fs_type,
@@ -1146,6 +1147,7 @@ static struct file_system_type fuseblk_fs_type = {
11461147
.kill_sb = fuse_kill_sb_blk,
11471148
.fs_flags = FS_REQUIRES_DEV | FS_HAS_SUBTYPE,
11481149
};
1150+
MODULE_ALIAS_FS("fuseblk");
11491151

11501152
static inline int register_fuseblk(void)
11511153
{

fs/gfs2/ops_fstype.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <linux/gfs2_ondisk.h>
2121
#include <linux/quotaops.h>
2222
#include <linux/lockdep.h>
23+
#include <linux/module.h>
2324

2425
#include "gfs2.h"
2526
#include "incore.h"
@@ -1425,11 +1426,12 @@ struct file_system_type gfs2_fs_type = {
14251426
.kill_sb = gfs2_kill_sb,
14261427
.owner = THIS_MODULE,
14271428
};
1429+
MODULE_ALIAS_FS("gfs2");
14281430

14291431
struct file_system_type gfs2meta_fs_type = {
14301432
.name = "gfs2meta",
14311433
.fs_flags = FS_REQUIRES_DEV,
14321434
.mount = gfs2_mount_meta,
14331435
.owner = THIS_MODULE,
14341436
};
1435-
1437+
MODULE_ALIAS_FS("gfs2meta");

fs/hfs/super.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,7 @@ static struct file_system_type hfs_fs_type = {
466466
.kill_sb = kill_block_super,
467467
.fs_flags = FS_REQUIRES_DEV,
468468
};
469+
MODULE_ALIAS_FS("hfs");
469470

470471
static void hfs_init_once(void *p)
471472
{

0 commit comments

Comments
 (0)