From: David Rientjes <rientjes@google.com>
To: kosaki.motohiro@gmail.com
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
akpm@linux-foundation.org,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
stable@vger.kernel.org
Subject: Re: [PATCH] __set_page_dirty uses spin_lock_irqsave instead of spin_lock_irq
Date: Tue, 4 Feb 2014 13:34:29 -0800 (PST) [thread overview]
Message-ID: <alpine.DEB.2.02.1402041334110.26019@chino.kir.corp.google.com> (raw)
In-Reply-To: <1391533776-2425-1-git-send-email-kosaki.motohiro@gmail.com>
On Tue, 4 Feb 2014, kosaki.motohiro@gmail.com wrote:
> From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
>
> To use spin_{un}lock_irq is dangerous if caller disabled interrupt.
> During aio buffer migration, we have a possibility to see the
> following call stack.
>
> aio_migratepage [disable interrupt]
> migrate_page_copy
> clear_page_dirty_for_io
> set_page_dirty
> __set_page_dirty_buffers
> __set_page_dirty
> spin_lock_irq
>
> This mean, current aio migration is a deadlockable. spin_lock_irqsave
> is a safer alternative and we should use it.
>
> Reported-by: David Rientjes rientjes@google.com>
> Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> Cc: stable@vger.kernel.org
Acked-by: David Rientjes <rientjes@google.com>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2014-02-04 21:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-04 17:09 kosaki.motohiro
2014-02-04 21:34 ` David Rientjes [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-02-04 16:58 kosaki.motohiro
2014-02-04 17:02 ` KOSAKI Motohiro
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=alpine.DEB.2.02.1402041334110.26019@chino.kir.corp.google.com \
--to=rientjes@google.com \
--cc=akpm@linux-foundation.org \
--cc=kosaki.motohiro@gmail.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=stable@vger.kernel.org \
/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