Re: WARNING in try_charge

From: Michal Hocko
Date: Mon Aug 06 2018 - 15:46:04 EST

[CCing Greg - the email thread starts here]

On Mon 06-08-18 12:12:02, syzbot wrote:
> Hello,
> syzbot has tested the proposed patch and the reproducer did not trigger
> crash:

OK, this is reassuring. Btw Greg has pointed out this potential case
but I simply didn't get what he meant. He was suggesting MMF_OOM_SKIP
but I didn't get why that matters. I didn't think about a race.

So how about this patch: