Patch "hostfs: Freeing an ERR_PTR in hostfs_fill_sb_common()" has been added to the 4.7-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
hostfs: Freeing an ERR_PTR in hostfs_fill_sb_common()
to the 4.7-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:
hostfs-freeing-an-err_ptr-in-hostfs_fill_sb_common.patch
and it can be found in the queue-4.7 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
8a545f185145e3c09348cd74326268ecfc6715a3Mon Sep 17 00:00:00 2001
From: Dan Carpenter <[email protected]>
Date: Wed, 13 Jul 2016 13:12:34 +0300
Subject: hostfs: Freeing an ERR_PTR in hostfs_fill_sb_common()
From: Dan Carpenter <[email protected]>
commit 8a545f185145e3c09348cd74326268ecfc6715a3 upstream.
We can't pass error pointers to kfree() or it causes an oops.
--- fs/hostfs/hostfs_kern.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
fs/hostfs/hostfs_kern.c +4 -3
@@ -959,10 +959,11 @@ static int hostfs_fill_sb_common(structif (S_ISLNK (root_inode->i_mode)) {char *name =follow_link (host_root_path); -if (IS_ERR (name)) +if (IS_ERR (name)) { err =PTR_ERR (name); -else - err =read_name (root_inode, name); + goto out_put; + } + err =read_name (root_inode, name);kfree (name);if (err) goto out_put;
Patches currently in stable-queue which might be from [email protected] are
queue-4.7/mtd-pmcmsp-flash-allocating-too-much-in-init_msp_flash.patch queue-4.7/hostfs-freeing-an-err_ptr-in-hostfs_fill_sb_common.patch queue-4.7/mtd-maps-sa1100-flash-potential-null-dereference.patch queue-4.7/qxl-check-for-kmap-failures.patch queue-4.7/power-supply-max17042_battery-fix-model-download-bug.patch