From: Paolo 'Blaisorblade' Giarrusso Date: Tue, 11 Apr 2006 05:53:29 +0000 (-0700) Subject: [PATCH] uml: make 64-bit COW files compatible with 32-bit ones X-Git-Tag: v2.6.17-rc2~241 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=cda402b283c34a24b091f78eee116963e9494762;p=linux-2.6-omap-h63xx.git [PATCH] uml: make 64-bit COW files compatible with 32-bit ones This is the minimal fix to make 64-bit UML binaries create 32-bit compatible COW files and read them. I've indeed tested that current code doesn't do this - the code gets SIGFPE for a division by a value read at the wrong place, where 0 is found. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Cc: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/um/drivers/cow_user.c b/arch/um/drivers/cow_user.c index 61951b72126..afdf1ea0f55 100644 --- a/arch/um/drivers/cow_user.c +++ b/arch/um/drivers/cow_user.c @@ -75,7 +75,7 @@ struct cow_header_v3 { __u32 alignment; __u32 cow_format; char backing_file[PATH_LEN_V3]; -}; +} __attribute__((packed)); /* COW format definitions - for now, we have only the usual COW bitmap */ #define COW_BITMAP 0