[Btrfs-devel] [ANNOUNCE] Btrfs v0.13
Alex Chiang
achiang at hp.com
Mon Mar 31 14:02:52 PDT 2008
* Chris Mason <chris.mason at oracle.com>:
>
> Great, thanks I'll take these two. The kernel side needs the
> same hash.c fix, but I've already got that change made locally.
Here's a patch for the kernel side.
/ac
Subject: [PATCH] btrfs: Stop trashing 'name' arg of btrfs_name_hash
From: Alex Chiang <achiang at hp.com>
In btrfs_name_hash, Local variable 'buf' is declared as
__u32 buf[2];
but we then try to do this:
buf[0] = 0x67452301;
buf[1] = 0xefcdab89;
buf[2] = 0x98badcfe;
buf[3] = 0x10325476;
Oops. Fix buf to be the proper size.
Signed-off-by: Alex Chiang <achiang at hp.com>
diff -r e4cd88595ed7 -r 03942eecb56d hash.c
--- a/hash.c Thu Feb 21 14:54:12 2008 -0500
+++ b/hash.c Mon Mar 31 14:58:00 2008 -0600
@@ -81,7 +81,7 @@ u64 btrfs_name_hash(const char *name, in
__u32 hash;
__u32 minor_hash = 0;
const char *p;
- __u32 in[8], buf[2];
+ __u32 in[8], buf[4];
u64 hash_result;
if (len == 1 && *name == '.') {
More information about the Btrfs-devel
mailing list