From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org,
Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>,
Leonid Yegoshin <yegoshin@mips.com>,
Rik van Riel <riel@redhat.com>, Michal Hocko <mhocko@suse.cz>,
Mel Gorman <mgorman@suse.de>, Ralf Baechle <ralf@linux-mips.org>,
Russell King <rmk@arm.linux.org.uk>,
David Miller <davem@davemloft.net>,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: [ 16/33] mm compaction: fix of improper cache flush in migration code
Date: Wed, 5 Jun 2013 13:52:54 -0700 [thread overview]
Message-ID: <20130605204706.075067611@linuxfoundation.org> (raw)
In-Reply-To: <20130605204702.359510786@linuxfoundation.org>
3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
commit c2cc499c5bcf9040a738f49e8051b42078205748 upstream.
Page 'new' during MIGRATION can't be flushed with flush_cache_page().
Using flush_cache_page(vma, addr, pfn) is justified only if the page is
already placed in process page table, and that is done right after
flush_cache_page(). But without it the arch function has no knowledge
of process PTE and does nothing.
Besides that, flush_cache_page() flushes an application cache page, but
the kernel has a different page virtual address and dirtied it.
Replace it with flush_dcache_page(new) which is the proper usage.
The old page is flushed in try_to_unmap_one() before migration.
This bug takes place in Sead3 board with M14Kc MIPS CPU without cache
aliasing (but Harvard arch - separate I and D cache) in tight memory
environment (128MB) each 1-3days on SOAK test. It fails in cc1 during
kernel build (SIGILL, SIGBUS, SIGSEG) if CONFIG_COMPACTION is switched
ON.
Signed-off-by: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Cc: Leonid Yegoshin <yegoshin@mips.com>
Acked-by: Rik van Riel <riel@redhat.com>
Cc: Michal Hocko <mhocko@suse.cz>
Acked-by: Mel Gorman <mgorman@suse.de>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
mm/migrate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -147,7 +147,7 @@ static int remove_migration_pte(struct p
if (PageHuge(new))
pte = pte_mkhuge(pte);
#endif
- flush_cache_page(vma, addr, pte_pfn(pte));
+ flush_dcache_page(new);
set_pte_at(mm, addr, ptep, pte);
if (PageHuge(new)) {
next prev parent reply other threads:[~2013-06-05 20:52 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-05 20:52 [ 00/33] 3.0.81-stable review Greg Kroah-Hartman
2013-06-05 20:52 ` [ 01/33] avr32: fix relocation check for signed 18-bit offset Greg Kroah-Hartman
2013-06-05 20:52 ` [ 02/33] ARM: plat-orion: Fix num_resources and id for ge10 and ge11 Greg Kroah-Hartman
2013-06-05 20:52 ` [ 03/33] staging: vt6656: use free_netdev instead of kfree Greg Kroah-Hartman
2013-06-05 20:52 ` [ 04/33] usb: option: Add Telewell TW-LTE 4G Greg Kroah-Hartman
2013-06-05 20:52 ` [ 05/33] USB: option: add device IDs for Dell 5804 (Novatel E371) WWAN card Greg Kroah-Hartman
2013-06-05 20:52 ` [ 06/33] USB: ftdi_sio: Add support for Newport CONEX motor drivers Greg Kroah-Hartman
2013-06-05 20:52 ` [ 07/33] USB: cxacru: potential underflow in cxacru_cm_get_array() Greg Kroah-Hartman
2013-06-05 20:52 ` [ 08/33] TTY: Fix tty miss restart after we turn off flow-control Greg Kroah-Hartman
2013-06-05 20:52 ` [ 09/33] USB: Blacklisted Cinterions PLxx WWAN Interface Greg Kroah-Hartman
2013-06-05 20:52 ` [ 10/33] USB: reset resume quirk needed by a hub Greg Kroah-Hartman
2013-06-05 20:52 ` [ 11/33] USB: UHCI: fix for suspend of virtual HP controller Greg Kroah-Hartman
2013-06-05 20:52 ` [ 12/33] cifs: only set ops for inodes in I_NEW state Greg Kroah-Hartman
2013-06-05 20:52 ` [ 13/33] fat: fix possible overflow for fat_clusters Greg Kroah-Hartman
2013-06-05 20:52 ` [ 14/33] ocfs2: goto out_unlock if ocfs2_get_clusters_nocache() failed in ocfs2_fiemap() Greg Kroah-Hartman
2013-06-05 20:52 ` [ 15/33] Kirkwood: Enable PCIe port 1 on QNAP TS-11x/TS-21x Greg Kroah-Hartman
2013-06-05 20:52 ` Greg Kroah-Hartman [this message]
2013-06-05 20:52 ` [ 17/33] klist: del waiter from klist_remove_waiters before wakeup waitting process Greg Kroah-Hartman
2013-06-05 20:52 ` [ 18/33] wait: fix false timeouts when using wait_event_timeout() Greg Kroah-Hartman
2013-06-05 20:52 ` [ 19/33] nilfs2: fix issue of nilfs_set_page_dirty() for page at EOF boundary Greg Kroah-Hartman
2013-06-05 20:52 ` [ 20/33] mm: mmu_notifier: re-fix freed page still mapped in secondary MMU Greg Kroah-Hartman
2013-06-05 20:52 ` [ 21/33] drivers/block/brd.c: fix brd_lookup_page() race Greg Kroah-Hartman
2013-06-05 20:53 ` [ 22/33] mm/THP: use pmd_populate() to update the pmd with pgtable_t pointer Greg Kroah-Hartman
2013-06-05 20:53 ` [ 23/33] um: Serve io_remap_pfn_range() Greg Kroah-Hartman
2013-06-05 20:53 ` [ 24/33] drm/radeon: fix card_posted check for newer asics Greg Kroah-Hartman
2013-06-05 20:53 ` [ 25/33] cifs: fix potential buffer overrun when composing a new options string Greg Kroah-Hartman
2013-06-05 20:53 ` [ 26/33] USB: io_ti: Fix NULL dereference in chase_port() Greg Kroah-Hartman
2013-06-05 20:53 ` [ 27/33] libata: make ata_exec_internal_sg honor DMADIR Greg Kroah-Hartman
2013-06-05 20:53 ` [ 28/33] xen/events: Handle VIRQ_TIMER before any other hardirq in event loop Greg Kroah-Hartman
2013-06-05 20:53 ` [ 29/33] jfs: fix a couple races Greg Kroah-Hartman
2013-06-05 20:53 ` [ 30/33] ALSA: usb-audio: fix possible hang and overflow in parse_uac2_sample_rate_range() Greg Kroah-Hartman
2013-06-05 20:53 ` [ 31/33] ALSA: usb-audio: avoid integer overflow in create_fixed_stream_quirk() Greg Kroah-Hartman
2013-06-05 20:53 ` [ 32/33] mac80211: close AP_VLAN interfaces before unregistering all Greg Kroah-Hartman
2013-06-05 20:53 ` [ 33/33] thinkpad-acpi: recognize latest V-Series using DMI_BIOS_VENDOR Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130605204706.075067611@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=Leonid.Yegoshin@imgtec.com \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mhocko@suse.cz \
--cc=ralf@linux-mips.org \
--cc=riel@redhat.com \
--cc=rmk@arm.linux.org.uk \
--cc=stable@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=yegoshin@mips.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox