+ binfmt_flat-delete-two-error-messages-for-a-failed-memory-allocation-in-decompress_exec.patch added to -mm tree

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

 



The patch titled
     Subject: binfmt_flat: delete two error messages for a failed memory allocation in decompress_exec()
has been added to the -mm tree.  Its filename is
     binfmt_flat-delete-two-error-messages-for-a-failed-memory-allocation-in-decompress_exec.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/binfmt_flat-delete-two-error-messages-for-a-failed-memory-allocation-in-decompress_exec.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/binfmt_flat-delete-two-error-messages-for-a-failed-memory-allocation-in-decompress_exec.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Subject: binfmt_flat: delete two error messages for a failed memory allocation in decompress_exec()

Omit extra messages for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Link: http://lkml.kernel.org/r/f92aac79-b05e-321a-1a19-d38c7159ee9c@xxxxxxxxxxxxxxxxxxxxx
Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/binfmt_flat.c |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff -puN fs/binfmt_flat.c~binfmt_flat-delete-two-error-messages-for-a-failed-memory-allocation-in-decompress_exec fs/binfmt_flat.c
--- a/fs/binfmt_flat.c~binfmt_flat-delete-two-error-messages-for-a-failed-memory-allocation-in-decompress_exec
+++ a/fs/binfmt_flat.c
@@ -192,13 +192,11 @@ static int decompress_exec(
 
 	memset(&strm, 0, sizeof(strm));
 	strm.workspace = kmalloc(zlib_inflate_workspacesize(), GFP_KERNEL);
-	if (strm.workspace == NULL) {
-		pr_debug("no memory for decompress workspace\n");
+	if (!strm.workspace)
 		return -ENOMEM;
-	}
+
 	buf = kmalloc(LBUFSIZE, GFP_KERNEL);
-	if (buf == NULL) {
-		pr_debug("no memory for read buffer\n");
+	if (!buf) {
 		retval = -ENOMEM;
 		goto out_free;
 	}
_

Patches currently in -mm which might be from elfring@xxxxxxxxxxxxxxxxxxxxx are

binfmt_flat-delete-two-error-messages-for-a-failed-memory-allocation-in-decompress_exec.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 Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux