lkml.org 
[lkml]   [2018]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.4 33/70] Tools: hv: Fix a bug in the key delete code
    Date
    4.4-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: K. Y. Srinivasan <kys@microsoft.com>

    commit 86503bd35dec0ce363e9fdbf5299927422ed3899 upstream.

    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>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    tools/hv/hv_kvp_daemon.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- 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, cons
    * 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;

    \
     
     \ /
      Last update: 2018-09-24 14:11    [W:4.027 / U:0.132 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site