]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
parisc: Fix race in pci-dma.c
authorJohn David Anglin <dave.anglin@bell.net>
Fri, 25 Nov 2016 01:06:32 +0000 (20:06 -0500)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 23 Feb 2017 03:54:40 +0000 (03:54 +0000)
commitc2bf3d858ef2da9d89b8b561859a2d0715c4423d
treee081d2d9b972e43f99069c9f39aaf009c3ea623a
parent0a74b364c4c2ce4bfffdbefd62cced99ad76bec9
parisc: Fix race in pci-dma.c

commit c0452fb9fb8f49c7d68ab9fa0ad092016be7b45f upstream.

We are still troubled by occasional random segmentation faults and
memory memory corruption on SMP machines.  The causes quite a few
package builds to fail on the Debian buildd machines for parisc.  When
gcc-6 failed to build three times in a row, I looked again at the TLB
related code.  I found a couple of issues.  This is the first.

In general, we need to ensure page table updates and corresponding TLB
purges are atomic.  The attached patch fixes an instance in pci-dma.c
where the page table update was not guarded by the TLB lock.

Tested on rp3440 and c8000.  So far, no further random segmentation
faults have been observed.

Signed-off-by: John David Anglin <dave.anglin@bell.net>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
arch/parisc/kernel/pci-dma.c