Skip to contentSkip to conversation

Patch "ext4: return -ENOMEM instead of success" has been added to the 4.4-stable tree

PATCH [email protected] 1 participant 1 message Jan 4, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

ext4: return -ENOMEM instead of success

to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
ext4-return-enomem-instead-of-success.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 578620f451f836389424833f1454eeeb2ffc9e9f Mon Sep 17 00:00:00 2001

From: Dan Carpenter <[email protected]>
Date: Sat, 10 Dec 2016 09:56:01 -0500
Subject: ext4: return -ENOMEM instead of success

From: Dan Carpenter <[email protected]>

commit 578620f451f836389424833f1454eeeb2ffc9e9f upstream.

We should set the error code if kzalloc() fails.

Fixes 67cf5b09a46f ("ext4: add the basic function for inline data support")
---
 fs/ext4/inline.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
fs/ext4/inline.c +3 -1
@@ -336,8 +336,10 @@ static int ext4_update_inline_data(handl
 
 	len -= EXT4_MIN_INLINE_DATA_SIZE;
 	value = kzalloc(len, GFP_NOFS);
-	if (!value)
+	if (!value) {
+		error = -ENOMEM;
 		goto out;
+	}
 
 	error = ext4_xattr_ibody_get(inode, i.name_index, i.name,
 				     value, len);

Patches currently in stable-queue which might be from [email protected] are

queue-4.4/ext4-return-enomem-instead-of-success.patch