[PATCH v2] hv: kvp: Avoid reading past allocated blocks from KVP file

Long Li longli at microsoft.com
Wed Nov 1 18:56:16 UTC 2017


> -----Original Message-----
> From: Greg KH [mailto:greg at kroah.com]
> Sent: Wednesday, November 1, 2017 11:54 AM
> To: Long Li <longli at microsoft.com>
> Cc: KY Srinivasan <kys at microsoft.com>; Haiyang Zhang
> <haiyangz at microsoft.com>; Stephen Hemminger
> <sthemmin at microsoft.com>; devel at linuxdriverproject.org; linux-
> kernel at vger.kernel.org; stable at vger.kernel.org; Paul Meyer
> <Paul.Meyer at microsoft.com>
> Subject: Re: [PATCH v2] hv: kvp: Avoid reading past allocated blocks from
> KVP file
> 
> On Wed, Nov 01, 2017 at 06:39:00PM +0000, Long Li wrote:
> > > From: Greg KH [mailto:greg at kroah.com]
> > > Sent: Tuesday, October 31, 2017 11:50 PM
> > > To: Long Li <longli at microsoft.com>
> > > Cc: KY Srinivasan <kys at microsoft.com>; Haiyang Zhang
> > > <haiyangz at microsoft.com>; Stephen Hemminger
> > > <sthemmin at microsoft.com>; devel at linuxdriverproject.org; linux-
> > > kernel at vger.kernel.org; stable at vger.kernel.org; Paul Meyer
> > > <Paul.Meyer at microsoft.com>; Long Li <longli at microsoft.com>
> > > 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 <Paul.Meyer at microsoft.com>
> > > >
> > > > 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 <Paul.Meyer at microsoft.com>
> > > > Signed-off-by: Long Li <longli at microsoft.com>
> > > > ---
> > > >  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 :)

I have sent a "revised v2". Please let me know if it is acceptable. If not I'll send a "v3".

> 
> greg k-h


More information about the devel mailing list