From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754817AbdKASxw (ORCPT ); Wed, 1 Nov 2017 14:53:52 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:60147 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751576AbdKASxu (ORCPT ); Wed, 1 Nov 2017 14:53:50 -0400 X-ME-Sender: Date: Wed, 1 Nov 2017 19:54:03 +0100 From: Greg KH To: Long Li Cc: KY Srinivasan , Haiyang Zhang , Stephen Hemminger , "devel@linuxdriverproject.org" , "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" , Paul Meyer Subject: Re: [PATCH v2] hv: kvp: Avoid reading past allocated blocks from KVP file Message-ID: <20171101185403.GA8654@kroah.com> References: <20171031200235.9379-1-longli@exchange.microsoft.com> <20171101064932.GA30717@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 01, 2017 at 06:39:00PM +0000, Long Li wrote: > > From: Greg KH [mailto:greg@kroah.com] > > Sent: Tuesday, October 31, 2017 11:50 PM > > To: Long Li > > Cc: KY Srinivasan ; Haiyang Zhang > > ; Stephen Hemminger > > ; devel@linuxdriverproject.org; linux- > > kernel@vger.kernel.org; stable@vger.kernel.org; Paul Meyer > > ; Long Li > > Subject: Re: [PATCH v2] hv: kvp: Avoid reading past allocated blocks from > > KVP file > > > > On Tue, Oct 31, 2017 at 01:02:35PM -0700, Long Li wrote: > > > From: Paul Meyer > > > > > > While reading in more than one block (50) of KVP records, the > > > allocation goes per block, but the reads used the total number of > > > allocated records (without resetting the pointer/stream). This causes > > > the records buffer to overrun when the refresh reads more than one > > > block over the previous capacity (e.g. reading more than 100 KVP > > > records whereas the in-memory database was empty before). > > > > > > Fix this by reading the correct number of KVP records from file each time. > > > > > > Signed-off-by: Paul Meyer > > > Signed-off-by: Long Li > > > --- > > > tools/hv/hv_kvp_daemon.c | 66 > > > ++++++++---------------------------------------- > > > 1 file changed, 10 insertions(+), 56 deletions(-) > > > > When you version a patch, you always have to say what changed below the > > --- line, as the documentation states to do... > > Sorry it was my bad. Can I resend v2 and indicate what has changed? Why wouldn't you? But it would be v3 then :) greg k-h