lkml.org 
[lkml]   [2020]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: wait_on_page_bit_common(TASK_KILLABLE, EXCLUSIVE) can miss wakeup?
On 06/27, Linus Torvalds wrote:
>
> --- a/mm/filemap.c
> +++ b/mm/filemap.c
> @@ -1150,6 +1150,12 @@ static inline int wait_on_page_bit_common(wait_queue_head_t *q,
> io_schedule();
>
> if (behavior == EXCLUSIVE) {
> + /*
> + * Make sure we don't get any exclusive wakeups
> + * after this point!
> + */
> + __set_current_state(TASK_RUNNING);
> + smp_mb__before_atomic();
> if (!test_and_set_bit_lock(bit_nr, &page->flags))
> break;
> } else if (behavior == SHARED) {

FWIW,

Reviewed-by: Oleg Nesterov <oleg@redhat.com>

\
 
 \ /
  Last update: 2020-06-29 21:14    [W:0.104 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site