openwrtv3/target/linux/brcm63xx/patches-4.1/803-jffs2-work-around-unaligned-accesses-failing-on-bcm6.patch
Hauke Mehrtens fcbc97ad78 kernel: update kernel 4.1 to version 4.1.20
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 49035
2016-03-18 23:41:21 +00:00

26 lines
809 B
Diff

From ff3409ab17d56450943364ba49a16960e3cdda9b Mon Sep 17 00:00:00 2001
From: Jonas Gorski <jogo@openwrt.org>
Date: Sun, 6 Apr 2014 22:33:16 +0200
Subject: [RFC] jffs2: work around unaligned accesses failing on bcm63xx/smp
Unligned memcpy_fromio randomly fails with an unaligned dst. Work around
it by ensuring we are always doing aligned copies.
Should fix filename corruption in jffs2 with SMP.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
---
fs/jffs2/nodelist.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/fs/jffs2/nodelist.h
+++ b/fs/jffs2/nodelist.h
@@ -259,7 +259,7 @@ struct jffs2_full_dirent
uint32_t ino; /* == zero for unlink */
unsigned int nhash;
unsigned char type;
- unsigned char name[0];
+ unsigned char name[0] __attribute__((aligned((sizeof(long)))));
};
/*