Skip to contentSkip to conversation

patch "Tools: hv: Fix a bug in the key delete code" added to char-misc-linus

PATCH [email protected] 1 participant 1 message Sep 12, 2018

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

Tools: hv: Fix a bug in the key delete code

to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-linus branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.

If you have any questions about this process, please let me know.

Quoted 1 line

From 86503bd35dec0ce363e9fdbf5299927422ed3899 Mon Sep 17 00:00:00 2001

From: "K. Y. Srinivasan" <[email protected]>
Date: Fri, 10 Aug 2018 23:06:07 +0000
Subject: Tools: hv: Fix a bug in the key delete code

Fix a bug in the key delete code - the num_records range from 0 to num_records-1.

---
 tools/hv/hv_kvp_daemon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/hv/hv_kvp_daemon.c +1 -1
index dbf6e8bd98ba..bbb2a8ef367c 100644
@@ -286,7 +286,7 @@ static int kvp_key_delete(int pool, const __u8 *key, int key_size)
 		 * Found a match; just move the remaining
 		 * entries up.
 		 */
-		if (i == num_records) {
+		if (i == (num_records - 1)) {
 			kvp_file_info[pool].num_records--;
 			kvp_update_file(pool);
 			return 0;
Signature · 1 line
2.18.0