Skip to content

Commit cda402b

Browse files
Paolo 'Blaisorblade' GiarrussoLinus Torvalds
authored andcommitted
[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 <[email protected]> Cc: Jeff Dike <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 60baa15 commit cda402b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/um/drivers/cow_user.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ struct cow_header_v3 {
7575
__u32 alignment;
7676
__u32 cow_format;
7777
char backing_file[PATH_LEN_V3];
78-
};
78+
} __attribute__((packed));
7979

8080
/* COW format definitions - for now, we have only the usual COW bitmap */
8181
#define COW_BITMAP 0

0 commit comments

Comments
 (0)