* [nacked] mm-gup-fix-null-pointer-dereference-detected-by-coverity.patch removed from -mm tree
@ 2020-04-12 6:43 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2020-04-12 6:43 UTC (permalink / raw)
To: akpm, ira.weiny, miles.chen, mm-commits
The patch titled
Subject: mm/gup: fix null pointer dereference detected by coverity
has been removed from the -mm tree. Its filename was
mm-gup-fix-null-pointer-dereference-detected-by-coverity.patch
This patch was dropped because it was nacked
------------------------------------------------------
From: Miles Chen <miles.chen@mediatek.com>
Subject: mm/gup: fix null pointer dereference detected by coverity
In fixup_user_fault(), it is possible that unlocked is NULL,
so we should test unlocked before using it.
For example, in arch/arc/kernel/process.c, NULL is passed
to fixup_user_fault().
SYSCALL_DEFINE3(arc_usr_cmpxchg, int *, uaddr, int, expected, int, new)
{
...
ret = fixup_user_fault(current, current->mm, (unsigned long) uaddr,
FAULT_FLAG_WRITE, NULL);
...
}
Link: http://lkml.kernel.org/r/20200407095107.1988-1-miles.chen@mediatek.com
Fixes: 4a9e1cda2748 ("mm: bring in additional flag for fixup_user_fault to signal unlock")
Signed-off-by: Miles Chen <miles.chen@mediatek.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/gup.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/mm/gup.c~mm-gup-fix-null-pointer-dereference-detected-by-coverity
+++ a/mm/gup.c
@@ -1231,7 +1231,8 @@ retry:
if (ret & VM_FAULT_RETRY) {
down_read(&mm->mmap_sem);
if (!(fault_flags & FAULT_FLAG_TRIED)) {
- *unlocked = true;
+ if (unlocked)
+ *unlocked = true;
fault_flags |= FAULT_FLAG_TRIED;
goto retry;
}
_
Patches currently in -mm which might be from miles.chen@mediatek.com are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-04-12 6:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-12 6:43 [nacked] mm-gup-fix-null-pointer-dereference-detected-by-coverity.patch removed from -mm tree akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).