Messages in this thread | | | Date | Mon, 29 Jun 2020 17:13:41 +0200 | From | Oleg Nesterov <> | Subject | Re: 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>
| |