Skip to content

Commit 79907d8

Browse files
Alan Coxtorvalds
authored andcommitted
misc: Fix allocation 'borrowed' by vhost_net
10, 233 is allocated officially to /dev/kmview which is shipping in Ubuntu and Debian distributions. vhost_net seem to have borrowed it without making a proper request and this causes regressions in the other distributions. vhost_net can use a dynamic minor so use that instead. Also update the file with a comment to try and avoid future misunderstandings. cc: stable@kernel.org Signed-off-by: Alan Cox <device@lanana.org> [ We should have caught this before 2.6.34 got released. - Linus ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 84f7586 commit 79907d8

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

‎drivers/vhost/net.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ const static struct file_operations vhost_net_fops = {
637637
};
638638

639639
static struct miscdevice vhost_net_misc = {
640-
VHOST_NET_MINOR,
640+
MISC_DYNAMIC_MINOR,
641641
"vhost-net",
642642
&vhost_net_fops,
643643
};

‎include/linux/miscdevice.h‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
#include <linux/module.h>
44
#include <linux/major.h>
55

6+
/*
7+
* These allocations are managed by device@lanana.org. If you use an
8+
* entry that is not in assigned your entry may well be moved and
9+
* reassigned, or set dynamic if a fixed value is not justified.
10+
*/
11+
612
#define PSMOUSE_MINOR 1
713
#define MS_BUSMOUSE_MINOR 2
814
#define ATIXL_BUSMOUSE_MINOR 3
@@ -30,7 +36,6 @@
3036
#define HPET_MINOR 228
3137
#define FUSE_MINOR 229
3238
#define KVM_MINOR 232
33-
#define VHOST_NET_MINOR 233
3439
#define BTRFS_MINOR 234
3540
#define AUTOFS_MINOR 235
3641
#define MISC_DYNAMIC_MINOR 255

0 commit comments

Comments
 (0)