From: Luis Henriques <luis.henriques@canonical.com>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
kernel-team@lists.ubuntu.com
Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>,
Leonid Yegoshin <yegoshin@mips.com>,
Michal Hocko <mhocko@suse.cz>, 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>,
Luis Henriques <luis.henriques@canonical.com>
Subject: [PATCH 31/70] mm compaction: fix of improper cache flush in migration code
Date: Tue, 4 Jun 2013 15:06:47 +0100 [thread overview]
Message-ID: <1370354846-14213-32-git-send-email-luis.henriques@canonical.com> (raw)
In-Reply-To: <1370354846-14213-1-git-send-email-luis.henriques@canonical.com>
3.5.7.14 -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: Luis Henriques <luis.henriques@canonical.com>
---
mm/migrate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/migrate.c b/mm/migrate.c
index 2e03986..65cc229 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -147,7 +147,7 @@ static int remove_migration_pte(struct page *new, struct vm_area_struct *vma,
pte = arch_make_huge_pte(pte, vma, new, 0);
}
#endif
- flush_cache_page(vma, addr, pte_pfn(pte));
+ flush_dcache_page(new);
set_pte_at(mm, addr, ptep, pte);
if (PageHuge(new)) {
--
1.8.1.2
next prev parent reply other threads:[~2013-06-04 14:08 UTC|newest]
Thread overview: 71+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-04 14:06 [ 3.5.y.z extended stable ] Linux 3.5.7.14 stable review Luis Henriques
2013-06-04 14:06 ` [PATCH 01/70] hwmon: fix error return code in abituguru_probe() Luis Henriques
2013-06-04 14:06 ` [PATCH 02/70] i2c: designware: fix RX FIFO overrun Luis Henriques
2013-06-04 14:06 ` [PATCH 03/70] i2c: designware: always clear interrupts before enabling them Luis Henriques
2013-06-04 14:06 ` [PATCH 04/70] btrfs: don't stop searching after encountering the wrong item Luis Henriques
2013-06-04 14:06 ` [PATCH 05/70] drm/radeon: Fix VRAM size calculation for VRAM >= 4GB Luis Henriques
2013-06-04 14:06 ` [PATCH 06/70] mantis: fix silly crash case Luis Henriques
2013-06-04 14:06 ` [PATCH 07/70] avr32: fix relocation check for signed 18-bit offset Luis Henriques
2013-06-04 14:06 ` [PATCH 08/70] virtio_console: fix uapi header Luis Henriques
2013-06-04 14:06 ` [PATCH 09/70] Input: egalax_ts - ABS_MT_POSITION_Y not reported well Luis Henriques
2013-06-04 14:06 ` [PATCH 10/70] staging: vt6656: use free_netdev instead of kfree Luis Henriques
2013-06-04 14:06 ` [PATCH 11/70] USB: xHCI: override bogus bulk wMaxPacketSize values Luis Henriques
2013-06-04 14:06 ` [PATCH 12/70] USB: UHCI: fix for suspend of virtual HP controller Luis Henriques
2013-06-04 14:06 ` [PATCH 13/70] USB: reset resume quirk needed by a hub Luis Henriques
2013-06-04 14:06 ` [PATCH 14/70] usb: option: Add Telewell TW-LTE 4G Luis Henriques
2013-06-04 14:06 ` [PATCH 15/70] USB: Blacklisted Cinterion's PLxx WWAN Interface Luis Henriques
2013-06-04 14:06 ` [PATCH 16/70] USB: option: add device IDs for Dell 5804 (Novatel E371) WWAN card Luis Henriques
2013-06-04 14:06 ` [PATCH 17/70] USB: ftdi_sio: Add support for Newport CONEX motor drivers Luis Henriques
2013-06-04 14:06 ` [PATCH 18/70] USB: cxacru: potential underflow in cxacru_cm_get_array() Luis Henriques
2013-06-04 14:06 ` [PATCH 19/70] TTY: Fix tty miss restart after we turn off flow-control Luis Henriques
2013-06-04 14:06 ` [PATCH 20/70] cifs: only set ops for inodes in I_NEW state Luis Henriques
2013-06-04 14:06 ` [PATCH 21/70] Kirkwood: Enable PCIe port 1 on QNAP TS-11x/TS-21x Luis Henriques
2013-06-04 14:06 ` [PATCH 22/70] mac80211: fix AP-mode frame matching Luis Henriques
2013-06-04 14:06 ` [PATCH 23/70] ARM: plat-orion: Fix num_resources and id for ge10 and ge11 Luis Henriques
2013-06-04 14:06 ` [PATCH 24/70] sunrpc: clarify comments on rpc_make_runnable Luis Henriques
2013-06-04 14:06 ` [PATCH 25/70] SUNRPC: Prevent an rpc_task wakeup race Luis Henriques
2013-06-04 14:06 ` [PATCH 26/70] perf: net_dropmonitor: Fix trace parameter order Luis Henriques
2013-06-04 14:06 ` [PATCH 27/70] perf: net_dropmonitor: Fix symbol-relative addresses Luis Henriques
2013-06-04 14:06 ` [PATCH 28/70] fat: fix possible overflow for fat_clusters Luis Henriques
2013-06-04 14:06 ` [PATCH 29/70] wait: fix false timeouts when using wait_event_timeout() Luis Henriques
2013-06-04 14:06 ` [PATCH 30/70] rapidio/tsi721: fix bug in MSI interrupt handling Luis Henriques
2013-06-04 14:06 ` Luis Henriques [this message]
2013-06-04 14:06 ` [PATCH 32/70] mm/THP: use pmd_populate() to update the pmd with pgtable_t pointer Luis Henriques
2013-06-04 14:06 ` [PATCH 33/70] drivers/leds/leds-ot200.c: fix error caused by shifted mask Luis Henriques
2013-06-04 14:06 ` [PATCH 34/70] drivers/block/brd.c: fix brd_lookup_page() race Luis Henriques
2013-06-04 14:06 ` [PATCH 35/70] nilfs2: fix issue of nilfs_set_page_dirty() for page at EOF boundary Luis Henriques
2013-06-04 14:06 ` [PATCH 36/70] random: fix accounting race condition with lockless irq entropy_count update Luis Henriques
2013-06-04 14:06 ` [PATCH 37/70] ocfs2: goto out_unlock if ocfs2_get_clusters_nocache() failed in ocfs2_fiemap() Luis Henriques
2013-06-04 14:06 ` [PATCH 38/70] mm/pagewalk.c: walk_page_range should avoid VM_PFNMAP areas Luis Henriques
2013-06-04 14:06 ` [PATCH 39/70] staging:iio:light:tsl2x7x: fix the error handling in tsl2x7x_probe() Luis Henriques
2013-06-04 14:06 ` [PATCH 40/70] mwifiex: fix memory leak issue when driver unload Luis Henriques
2013-06-04 14:06 ` [PATCH 41/70] dm bufio: avoid a possible __vmalloc deadlock Luis Henriques
2013-06-04 14:06 ` [PATCH 42/70] tg3: Skip powering down function 0 on certain serdes devices Luis Henriques
2013-06-04 14:06 ` [PATCH 43/70] acpi/video_detect: blacklist samsung x360 Luis Henriques
2013-06-04 14:07 ` [PATCH 44/70] ACPI / video: Add "Asus UL30VT" to ACPI video detect blacklist Luis Henriques
2013-06-04 14:07 ` [PATCH 45/70] ACPI / video: Add "Asus UL30A" " Luis Henriques
2013-06-04 14:07 ` [PATCH 46/70] mm: mmu_notifier: re-fix freed page still mapped in secondary MMU Luis Henriques
2013-06-04 14:07 ` [PATCH 47/70] sched/debug: Limit sd->*_idx range on sysctl Luis Henriques
2013-06-04 14:07 ` [PATCH 48/70] sched/debug: Fix sd->*_idx limit range avoiding overflow Luis Henriques
2013-06-04 14:07 ` [PATCH 49/70] ipvs: ip_vs_sip_fill_param() BUG: bad check of return value Luis Henriques
2013-06-04 14:07 ` [PATCH 50/70] jfs: fix a couple races Luis Henriques
2013-06-04 14:07 ` [PATCH 51/70] cifs: fix potential buffer overrun when composing a new options string Luis Henriques
2013-06-04 14:07 ` [PATCH 52/70] ASoC: cs42l52: fix default value for MASTERA_VOL Luis Henriques
2013-06-04 14:07 ` [PATCH 53/70] drm/radeon: fix typo in cu_per_sh on verde Luis Henriques
2013-06-04 14:07 ` [PATCH 54/70] drm/radeon: fix card_posted check for newer asics Luis Henriques
2013-06-04 14:07 ` [PATCH 55/70] NFSv4: Fix a thinko in nfs4_try_open_cached Luis Henriques
2013-06-04 14:07 ` [PATCH 56/70] xfs: kill suid/sgid through the truncate path Luis Henriques
2013-06-04 14:07 ` [PATCH 57/70] iscsi-target: fix heap buffer overflow on error Luis Henriques
2013-06-04 14:07 ` [PATCH 58/70] reiserfs: fix deadlock with nfs racing on create/lookup Luis Henriques
2013-06-04 14:07 ` [PATCH 59/70] reiserfs: fix problems with chowning setuid file w/ xattrs Luis Henriques
2013-06-04 14:07 ` [PATCH 60/70] reiserfs: fix spurious multiple-fill in reiserfs_readdir_dentry Luis Henriques
2013-06-04 14:07 ` [PATCH 61/70] xen-netback: remove skb in xen_netbk_alloc_page Luis Henriques
2013-06-04 14:07 ` [PATCH 62/70] xen-netback: fix sparse warning Luis Henriques
2013-06-04 14:07 ` [PATCH 63/70] xen-netback: coalesce slots in TX path and fix regressions Luis Henriques
2013-06-04 14:07 ` [PATCH 64/70] xen-netback: don't disconnect frontend when seeing oversize packet Luis Henriques
2013-06-04 14:07 ` [PATCH 65/70] xen-netback: remove redundent parameter in netbk_count_requests Luis Henriques
2013-06-04 14:07 ` [PATCH 66/70] xen-netback: avoid allocating variable size array on stack Luis Henriques
2013-06-04 14:07 ` [PATCH 67/70] xen-netback: better names for thresholds Luis Henriques
2013-06-04 14:07 ` [PATCH 68/70] xen-netfront: remove unused variable `extra' Luis Henriques
2013-06-04 14:07 ` [PATCH 69/70] xen-netfront: frags -> slots in xennet_get_responses Luis Henriques
2013-06-04 14:07 ` [PATCH 70/70] xen-netfront: frags -> slots in log message Luis Henriques
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=1370354846-14213-32-git-send-email-luis.henriques@canonical.com \
--to=luis.henriques@canonical.com \
--cc=Leonid.Yegoshin@imgtec.com \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=kernel-team@lists.ubuntu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mhocko@suse.cz \
--cc=ralf@linux-mips.org \
--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
all inboxes | Powered by JetHome®