Searched hist:ba841078cd0557b43b59c63f5c048b12168f0db2 (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/mm/ |
H A D | mempolicy.c | diff ba841078cd0557b43b59c63f5c048b12168f0db2 Tue Apr 07 20:40:09 CDT 2020 Peter Xu <peterx@redhat.com> mm/mempolicy: Allow lookup_node() to handle fatal signal
lookup_node() uses gup to pin the page and get node information. It checks against ret>=0 assuming the page will be filled in. However it's also possible that gup will return zero, for example, when the thread is quickly killed with a fatal signal. Teach lookup_node() to gracefully return an error -EFAULT if it happens.
Meanwhile, initialize "page" to NULL to avoid potential risk of exploiting the pointer.
Fixes: 4426e945df58 ("mm/gup: allow VM_FAULT_RETRY for multiple times") Reported-by: syzbot+693dc11fcb53120b5559@syzkaller.appspotmail.com Signed-off-by: Peter Xu <peterx@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|