Skip to content

Commit 181ae40

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 8bbde0e commit 181ae40

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
@@ -100,7 +100,7 @@ struct cow_header_v3_broken {
100100
__u32 alignment;
101101
__u32 cow_format;
102102
char backing_file[PATH_LEN_V3];
103-
};
103+
} __attribute__((packed));
104104

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

0 commit comments

Comments
 (0)