summaryrefslogtreecommitdiff
path: root/fs/jffs2/super.c
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2018-04-16 16:25:19 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-04-24 10:29:28 +0300
commiteaf2bca68881d2d99289d5cfb18d04de55cc92ac (patch)
treef41fd61b4de0bdac50e29a605fe12059536a1634 /fs/jffs2/super.c
parent6bbb8018b1d074af56713649c2dfa08fc4cd2d2a (diff)
downloadlinux-eaf2bca68881d2d99289d5cfb18d04de55cc92ac.tar.xz
powerpc/lib: Fix off-by-one in alternate feature patching
commit b8858581febb050688e276b956796bc4a78299ed upstream. When we patch an alternate feature section, we have to adjust any relative branches that branch out of the alternate section. But currently we have a bug if we have a branch that points to past the last instruction of the alternate section, eg: FTR_SECTION_ELSE 1: b 2f or 6,6,6 2: ALT_FTR_SECTION_END(...) nop This will result in a relative branch at 1 with a target that equals the end of the alternate section. That branch does not need adjusting when it's moved to the non-else location. Currently we do adjust it, resulting in a branch that goes off into the link-time location of the else section, which is junk. The fix is to not patch branches that have a target == end of the alternate section. Fixes: d20fe50a7b3c ("KVM: PPC: Book3S HV: Branch inside feature section") Fixes: 9b1a735de64c ("powerpc: Add logic to patch alternative feature sections") Cc: stable@vger.kernel.org # v2.6.27+ Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/jffs2/super.c')
0 files changed, 0 insertions, 0 deletions