[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJd=RBA-UZmSTxNX63Vni+UPZBHwP4tvzE_qp1ZaHBqcNG7Fcw@mail.gmail.com>
Date: Tue, 20 Aug 2013 12:39:05 +0800
From: Hillf Danton <dhillf@...il.com>
To: Dave Jones <davej@...hat.com>, Hillf Danton <dhillf@...il.com>,
Linux-MM <linux-mm@...ck.org>,
Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: unused swap offset / bad page map.
On Tue, Aug 20, 2013 at 7:18 AM, Dave Jones <davej@...hat.com> wrote:
>
> btw, anyone have thoughts on a patch something like below ?
And another(sorry if message is reformatted by the mail agent,
and it took my an hour to get the agent back to the correct format but failed,
and thanks a lot for any howto send plain text message).
Hillf
--- a/mm/memory.c Wed Aug 7 16:29:34 2013
+++ b/mm/memory.c Tue Aug 20 11:13:06 2013
@@ -933,8 +933,10 @@ again:
if (progress >= 32) {
progress = 0;
if (need_resched() ||
- spin_needbreak(src_ptl) || spin_needbreak(dst_ptl))
+ spin_needbreak(src_ptl) || spin_needbreak(dst_ptl)) {
+ BUG_ON(entry.val);
break;
+ }
}
if (pte_none(*src_pte)) {
progress++;
--
> It's really annoying to debug stuff like this and have to walk
> over to the machine and reboot it by hand after it wedges during swapoff.
>
> Dave
>
> diff --git a/mm/swapfile.c b/mm/swapfile.c
> index 6cf2e60..bbb1192 100644
> --- a/mm/swapfile.c
> +++ b/mm/swapfile.c
> @@ -1587,6 +1587,10 @@ SYSCALL_DEFINE1(swapoff, const char __user *, specialfile)
> if (!capable(CAP_SYS_ADMIN))
> return -EPERM;
>
> + /* If we have hit memory corruption, we could hang during swapoff, so don't even try. */
> + if (test_taint(TAINT_BAD_PAGE))
> + return -EINVAL;
> +
> BUG_ON(!current->mm);
>
> pathname = getname(specialfile);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists