Patch "fs/affs: release old buffer head on error path" has been added to the 4.14-stable tree

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

 



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

    fs/affs: release old buffer head on error path

to the 4.14-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:
     fs-affs-release-old-buffer-head-on-error-path.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 70779b897395b330ba5a47bed84f94178da599f9 Mon Sep 17 00:00:00 2001
From: Pan Bian <bianpan2016@xxxxxxx>
Date: Wed, 20 Jan 2021 00:51:13 -0800
Subject: fs/affs: release old buffer head on error path

From: Pan Bian <bianpan2016@xxxxxxx>

commit 70779b897395b330ba5a47bed84f94178da599f9 upstream.

The reference count of the old buffer head should be decremented on path
that fails to get the new buffer head.

Fixes: 6b4657667ba0 ("fs/affs: add rename exchange")
CC: stable@xxxxxxxxxxxxxxx # 4.14+
Signed-off-by: Pan Bian <bianpan2016@xxxxxxx>
Signed-off-by: David Sterba <dsterba@xxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 fs/affs/namei.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/fs/affs/namei.c
+++ b/fs/affs/namei.c
@@ -461,8 +461,10 @@ affs_xrename(struct inode *old_dir, stru
 		return -EIO;
 
 	bh_new = affs_bread(sb, d_inode(new_dentry)->i_ino);
-	if (!bh_new)
+	if (!bh_new) {
+		affs_brelse(bh_old);
 		return -EIO;
+	}
 
 	/* Remove old header from its parent directory. */
 	affs_lock_dir(old_dir);


Patches currently in stable-queue which might be from bianpan2016@xxxxxxx are

queue-4.14/bluetooth-drop-hci-device-reference-before-return.patch
queue-4.14/isofs-release-buffer-head-before-return.patch
queue-4.14/mtd-spi-nor-hisi-sfc-put-child-node-np-on-error-path.patch
queue-4.14/bluetooth-put-hci-device-if-inquiry-procedure-interr.patch
queue-4.14/spi-atmel-put-allocated-master-before-return.patch
queue-4.14/fs-affs-release-old-buffer-head-on-error-path.patch
queue-4.14/regulator-axp20x-fix-reference-cout-leak.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux