Skip to contentSkip to conversation

Patch "ubifs: Set double hash cookie also for RENAME_EXCHANGE" has been added to the 4.12-stable tree

PATCH [email protected] 1 participant 1 message Jul 25, 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

ubifs: Set double hash cookie also for RENAME_EXCHANGE

to the 4.12-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:
ubifs-set-double-hash-cookie-also-for-rename_exchange.patch
and it can be found in the queue-4.12 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 a6664433d383eeb71cbdeb9aea2c66eeea76e742 Mon Sep 17 00:00:00 2001

From: Richard Weinberger <[email protected]>
Date: Mon, 26 Jun 2017 13:49:04 +0200
Subject: ubifs: Set double hash cookie also for RENAME_EXCHANGE

From: Richard Weinberger <[email protected]>

commit a6664433d383eeb71cbdeb9aea2c66eeea76e742 upstream.

We developed RENAME_EXCHANGE and UBIFS_FLG_DOUBLE_HASH more or less in parallel and this case was forgotten. :-(

Fixes d63d61c16972 ("ubifs: Implement UBIFS_FLG_DOUBLE_HASH")
---
 fs/ubifs/journal.c |    2 ++
 1 file changed, 2 insertions(+)
fs/ubifs/journal.c +2 -0
@@ -984,6 +984,7 @@ int ubifs_jnl_xrename(struct ubifs_info
 	dent1->nlen = cpu_to_le16(fname_len(snd_nm));
 	memcpy(dent1->name, fname_name(snd_nm), fname_len(snd_nm));
 	dent1->name[fname_len(snd_nm)] = '\0';
+	set_dent_cookie(c, dent1);
 	zero_dent_node_unused(dent1);
 	ubifs_prep_grp_node(c, dent1, dlen1, 0);
 
@@ -996,6 +997,7 @@ int ubifs_jnl_xrename(struct ubifs_info
 	dent2->nlen = cpu_to_le16(fname_len(fst_nm));
 	memcpy(dent2->name, fname_name(fst_nm), fname_len(fst_nm));
 	dent2->name[fname_len(fst_nm)] = '\0';
+	set_dent_cookie(c, dent2);
 	zero_dent_node_unused(dent2);
 	ubifs_prep_grp_node(c, dent2, dlen2, 0);
 

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

queue-4.12/ubifs-don-t-leak-kernel-memory-to-the-mtd.patch queue-4.12/ubifs-don-t-encrypt-special-files-on-creation.patch queue-4.12/ubifs-correctly-evict-xattr-inodes.patch queue-4.12/ubifs-set-double-hash-cookie-also-for-rename_exchange.patch