lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1567708980-8804-1-git-send-email-jrdr.linux@gmail.com>
Date:   Fri,  6 Sep 2019 00:13:00 +0530
From:   Souptick Joarder <jrdr.linux@...il.com>
To:     akpm@...ux-foundation.org, willy@...radead.org,
        rcampbell@...dia.com, jglisse@...hat.com, mhocko@...e.com,
        aneesh.kumar@...ux.ibm.com, peterz@...radead.org,
        airlied@...hat.com, thellstrom@...are.com
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Souptick Joarder <jrdr.linux@...il.com>
Subject: [PATCH] mm/memory.c: Convert to use vmf_error()

Convert to use vmf_error() here.

Signed-off-by: Souptick Joarder <jrdr.linux@...il.com>
---
 mm/memory.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/mm/memory.c b/mm/memory.c
index e2bb51b..1302be32 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1750,13 +1750,10 @@ static vm_fault_t __vm_insert_mixed(struct vm_area_struct *vma,
 	} else {
 		return insert_pfn(vma, addr, pfn, pgprot, mkwrite);
 	}
-
-	if (err == -ENOMEM)
-		return VM_FAULT_OOM;
-	if (err < 0 && err != -EBUSY)
-		return VM_FAULT_SIGBUS;
-
-	return VM_FAULT_NOPAGE;
+	if (!err || err == -EBUSY)
+		return VM_FAULT_NOPAGE;
+	else
+		return vmf_error(err);
 }
 
 vm_fault_t vmf_insert_mixed(struct vm_area_struct *vma, unsigned long addr,
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ