Skip to contentSkip to conversation

uml: Make vde_user.c build again

PATCH In review Alberto Bertogli 2 participants 3 messages Sep 17, 2008 – Sep 19, 2008 User-mode Linux (UML)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 uml: Make vde_user.c build again

Commit 43f5b308 ("uml: fix build when SLOB is enabled") removed kmalloc() from um_malloc.h, which breaks vde_user.c.

This patch fixes it by making vde_user.c call uml_kmalloc() instead of kmalloc().

---

This patch is against the Linus' current (as of about 5 minutes ago) tree. Without this patch, it wouldn't build.

I've tested it by booting my uml image, connecting it to the internet using vde_witch, and doing some network operations (some aptitude installs).

Thanks a lot,
Alberto

 arch/um/drivers/vde_user.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/um/drivers/vde_user.c +1 -1
index 56533db..744eacf 100644
@@ -78,7 +78,7 @@ void vde_init_libstuff(struct vde_data *vpri, struct vde_init *init)
 {
 	struct vde_open_args *args;
 
-	vpri->args = kmalloc(sizeof(struct vde_open_args), UM_GFP_KERNEL);
+	vpri->args = uml_kmalloc(sizeof(struct vde_open_args), UM_GFP_KERNEL);
 	if (vpri->args == NULL) {
 		printk(UM_KERN_ERR "vde_init_libstuff - vde_open_args "
 		       "allocation failed");
Signature · 1 line
1.6.0.87.g2858d
#1 lore raw
Quoted 27 lines · Alberto Bertogli

Commit 43f5b308 ("uml: fix build when SLOB is enabled") removed kmalloc() from um_malloc.h, which breaks vde_user.c.

This patch fixes it by making vde_user.c call uml_kmalloc() instead of kmalloc().

---

This patch is against the Linus' current (as of about 5 minutes ago) tree. Without this patch, it wouldn't build.

I've tested it by booting my uml image, connecting it to the internet using vde_witch, and doing some network operations (some aptitude installs).

Thanks a lot,
Alberto

arch/um/drivers/vde_user.c | 2 +-

1 files changed, 1 insertions(+), 1 deletions(-)
arch/um/drivers/vde_user.c +0 -0
index 56533db..744eacf 100644

arch/um/drivers/vde_user.c void vde_init_libstuff(struct vde_data *vpri, struct vde_init *init) · line 84

Quoted 8 lines
arch/um/drivers/vde_user.c +1 -1
@@ -78,7 +78,7 @@ void vde_init_libstuff(struct vde_data *vpri, struct vde_init *init)
 {
 	struct vde_open_args *args;
 
-	vpri->args = kmalloc(sizeof(struct vde_open_args), UM_GFP_KERNEL);
+	vpri->args = uml_kmalloc(sizeof(struct vde_open_args), UM_GFP_KERNEL);
 	if (vpri->args == NULL) {
 		printk(UM_KERN_ERR "vde_init_libstuff - vde_open_args "
 		       "allocation failed");

http://lkml.org/lkml/2008/7/23/142

Signature · 1 line
"Sometimes the only way to stay sane is to go a little crazy."
#2 lore raw
Quoted 31 lines · WANG Cong
Quoted 30 lines · Alberto Bertogli

Commit 43f5b308 ("uml: fix build when SLOB is enabled") removed kmalloc() from um_malloc.h, which breaks vde_user.c.

This patch fixes it by making vde_user.c call uml_kmalloc() instead of kmalloc().

---

This patch is against the Linus' current (as of about 5 minutes ago) tree. Without this patch, it wouldn't build.

I've tested it by booting my uml image, connecting it to the internet using vde_witch, and doing some network operations (some aptitude installs).

Thanks a lot,
Alberto

arch/um/drivers/vde_user.c | 2 +-

1 files changed, 1 insertions(+), 1 deletions(-)
arch/um/drivers/vde_user.c +0 -0
index 56533db..744eacf 100644
@@ -78,7 +78,7 @@ void vde_init_libstuff(struct vde_data *vpri, struct vde_init *init)
 {
 	struct vde_open_args *args;
 
Quoted 7 lines

arch/um/drivers/vde_user.c void vde_init_libstuff(struct vde_data *vpri, struct vde_init *init) · line 84

Quoted 5 lines
arch/um/drivers/vde_user.c +1 -1
-	vpri->args = kmalloc(sizeof(struct vde_open_args), UM_GFP_KERNEL);
+	vpri->args = uml_kmalloc(sizeof(struct vde_open_args), UM_GFP_KERNEL);
 	if (vpri->args == NULL) {
 		printk(UM_KERN_ERR "vde_init_libstuff - vde_open_args "
 		       "allocation failed");

http://lkml.org/lkml/2008/7/23/142

Thanks. Is there anything I can do to help get this into mainline?

The patch(es) looks really simple, and without it the build is broken if you use vde.

Thanks a lot,
Alberto