+ ehca-fix-do_mmap-error-check.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     ehca: fix do_mmap() error check
has been added to the -mm tree.  Its filename is
     ehca-fix-do_mmap-error-check.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: ehca: fix do_mmap() error check
From: Akinobu Mita <akinobu.mita@xxxxxxxxx>

The return value of do_mmap() should be checked by IS_ERR().

Acked-by: Hoang-Nam Nguyen <hnguyen@xxxxxxxxxx>
Cc: Christoph Raisch <raisch@xxxxxxxxxx>
Signed-off-by: Akinobu Mita <akinobu.mita@xxxxxxxxx>
Cc: Roland Dreier <rolandd@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/infiniband/hw/ehca/ehca_uverbs.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff -puN drivers/infiniband/hw/ehca/ehca_uverbs.c~ehca-fix-do_mmap-error-check drivers/infiniband/hw/ehca/ehca_uverbs.c
--- a/drivers/infiniband/hw/ehca/ehca_uverbs.c~ehca-fix-do_mmap-error-check
+++ a/drivers/infiniband/hw/ehca/ehca_uverbs.c
@@ -321,14 +321,14 @@ int ehca_mmap_nopage(u64 foffset, u64 le
 		     struct vm_area_struct **vma)
 {
 	down_write(&current->mm->mmap_sem);
-	*mapped = (void*)do_mmap(NULL,0, length, PROT_WRITE,
+	*mapped = (void*)do_mmap(NULL, 0, length, PROT_WRITE,
 				 MAP_SHARED | MAP_ANONYMOUS,
 				 foffset);
 	up_write(&current->mm->mmap_sem);
-	if (!(*mapped)) {
+	if (IS_ERR(*mapped)) {
 		ehca_gen_err("couldn't mmap foffset=%lx length=%lx",
 			     foffset, length);
-		return -EINVAL;
+		return PTR_ERR(*mmaped);
 	}
 
 	*vma = find_vma(current->mm, (u64)*mapped);
_

Patches currently in -mm which might be from akinobu.mita@xxxxxxxxx are

origin.patch
audit-fix-kstrdup-error-check.patch
gss_spkm3-fix-error-handling-in-module-init.patch
git-acpi.patch
git-alsa.patch
powerpc-use-is_init.patch
git-drm.patch
ehca-fix-kthread_create-error-check.patch
ehca-fix-do_mmap-error-check.patch
git-mtd.patch
net-use-bitrev8.patch
auth_gss-unregister-gss_domain-when-unloading-module.patch
iscsi-fix-crypto_alloc_hash-error-check.patch
git-watchdog.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux