lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1274440317.2291.1.camel@localhost>
Date:	Fri, 21 May 2010 19:11:57 +0800
From:	Ian Kent <raven@...maw.net>
To:	Kay Sievers <kay.sievers@...y.org>
Cc:	linux-kernel <linux-kernel@...r.kernel.org>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	"David S. Miller" <davem@...emloft.net>,
	Miklos Szeredi <miklos@...redi.hu>,
	Chris Mason <chris.mason@...cle.com>,
	Alasdair G Kergon <agk@...hat.com>,
	Tigran Aivazian <tigran@...azian.fsnet.co.uk>
Subject: Re: add devname module aliases to allow module on-demand
 auto-loading

On Thu, 2010-05-20 at 18:07 +0200, Kay Sievers wrote:
> From: Kay Sievers <kay.sievers@...y.org>
> Subject: add devname module aliases to allow module on-demand auto-loading
> 
> This adds:
>   alias: devname:<name>
> to some common kernel modules, which will allow the on-demand loading
> of the kernel module when the device node is accessed.
> 

snip ...

> --- a/fs/autofs4/dev-ioctl.c
> +++ b/fs/autofs4/dev-ioctl.c
> @@ -736,11 +736,14 @@ static const struct file_operations _dev
>  };
>  
>  static struct miscdevice _autofs_dev_ioctl_misc = {
> -	.minor 		= MISC_DYNAMIC_MINOR,
> +	.minor 		= AUTOFS_MINOR,
>  	.name  		= AUTOFS_DEVICE_NAME,
>  	.fops  		= &_dev_ioctl_fops
>  };
>  
> +MODULE_ALIAS_MISCDEV(BTRFS_MINOR);

Is this a typo or am I missing something?

Shouldn't it be:
+MODULE_ALIAS_MISCDEV(AUTOFS_MINOR);

> +MODULE_ALIAS("devname:autofs");
> +
>  /* Register/deregister misc character device */
>  int autofs_dev_ioctl_init(void)
>  {
> --- a/fs/btrfs/super.c
> +++ b/fs/btrfs/super.c
> @@ -832,11 +832,14 @@ static const struct file_operations btrf
>  };
>  
>  static struct miscdevice btrfs_misc = {
> -	.minor		= MISC_DYNAMIC_MINOR,
> +	.minor		= BTRFS_MINOR,
>  	.name		= "btrfs-control",
>  	.fops		= &btrfs_ctl_fops
>  };
>  
> +MODULE_ALIAS_MISCDEV(BTRFS_MINOR);
> +MODULE_ALIAS("devname:btrfs-control");
> +
>  static int btrfs_interface_init(void)
>  {
>  	return misc_register(&btrfs_misc);
> --- a/fs/fuse/dev.c
> +++ b/fs/fuse/dev.c
> @@ -18,6 +18,7 @@
>  #include <linux/slab.h>
>  
>  MODULE_ALIAS_MISCDEV(FUSE_MINOR);
> +MODULE_ALIAS("devname:fuse");
>  
>  static struct kmem_cache *fuse_req_cachep;
>  
> --- a/include/linux/miscdevice.h
> +++ b/include/linux/miscdevice.h
> @@ -31,6 +31,9 @@
>  #define FUSE_MINOR		229
>  #define KVM_MINOR		232
>  #define VHOST_NET_MINOR		233
> +#define BTRFS_MINOR		234
> +#define MAPPER_CTRL_MINOR	235
> +#define AUTOFS_MINOR		236
>  #define MISC_DYNAMIC_MINOR	255
>  
>  struct device;
> 
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ