Skip to contentSkip to conversation

binfmt_flat-delete-two-error-messages-for-a-failed-memory-allocation-in-decompress_exec.patch removed from -mm tree

merged [email protected] 1 participant 1 message Sep 11, 2017

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

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

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Markus Elfring <[email protected]>
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.

---

 fs/binfmt_flat.c |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
fs/binfmt_flat.c renamed from fs/binfmt_flat.c~binfmt_flat-delete-two-error-messages-for-a-failed-memory-allocation-in-decompress_exec +3 -5
diff -puN fs/binfmt_flat.c~binfmt_flat-delete-two-error-messages-for-a-failed-memory-allocation-in-decompress_exec 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 [email protected] are