* [PATCH 1/5] Tools: hv: Fix a bug in the key delete code
[not found] <20180810230520.2055-1-kys@linuxonhyperv.com>
@ 2018-08-10 23:06 ` kys
2018-08-13 16:41 ` Michael Kelley (EOSG)
0 siblings, 1 reply; 2+ messages in thread
From: kys @ 2018-08-10 23:06 UTC (permalink / raw)
To: gregkh, linux-kernel, devel, olaf, apw, jasowang, sthemmin,
Michael.H.Kelley, vkuznets
Cc: K. Y. Srinivasan, stable
From: "K. Y. Srinivasan" <kys@microsoft.com>
Fix a bug in the key delete code - the num_records range
from 0 to num_records-1.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reported-by: David Binderman <dcb314@hotmail.com>
Cc: <stable@vger.kernel.org>
---
tools/hv/hv_kvp_daemon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c
index dbf6e8bd98ba..bbb2a8ef367c 100644
--- a/tools/hv/hv_kvp_daemon.c
+++ b/tools/hv/hv_kvp_daemon.c
@@ -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;
--
2.18.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [PATCH 1/5] Tools: hv: Fix a bug in the key delete code
2018-08-10 23:06 ` [PATCH 1/5] Tools: hv: Fix a bug in the key delete code kys
@ 2018-08-13 16:41 ` Michael Kelley (EOSG)
0 siblings, 0 replies; 2+ messages in thread
From: Michael Kelley (EOSG) @ 2018-08-13 16:41 UTC (permalink / raw)
To: KY Srinivasan, gregkh@linuxfoundation.org,
linux-kernel@vger.kernel.org, devel@linuxdriverproject.org,
olaf@aepfle.de, apw@canonical.com, jasowang@redhat.com,
Stephen Hemminger, vkuznets@redhat.com
Cc: stable@vger.kernel.org
From: kys@linuxonhyperv.com <kys@linuxonhyperv.com> Sent: Friday, August 10, 2018 4:06 PM
>
> Fix a bug in the key delete code - the num_records range
> from 0 to num_records-1.
>
> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
> Reported-by: David Binderman <dcb314@hotmail.com>
> Cc: <stable@vger.kernel.org>
> ---
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-08-13 16:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20180810230520.2055-1-kys@linuxonhyperv.com>
2018-08-10 23:06 ` [PATCH 1/5] Tools: hv: Fix a bug in the key delete code kys
2018-08-13 16:41 ` Michael Kelley (EOSG)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).