linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Long Li <longli@microsoft.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: KY Srinivasan <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	"devel@linuxdriverproject.org" <devel@linuxdriverproject.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Paul Meyer <Paul.Meyer@microsoft.com>
Subject: RE: [PATCH] hv: kvp: Avoid reading past allocated blocks from KVP file
Date: Tue, 31 Oct 2017 18:10:00 +0000	[thread overview]
Message-ID: <MWHPR21MB0190C9F2DCD0D34F2295D865CE5E0@MWHPR21MB0190.namprd21.prod.outlook.com> (raw)
In-Reply-To: <20171031084248.GA11479@kroah.com>

> From: Greg KH [mailto:gregkh@linuxfoundation.org]
> Sent: Tuesday, October 31, 2017 1:43 AM
> To: Long Li <longli@microsoft.com>
> Cc: KY Srinivasan <kys@microsoft.com>; Haiyang Zhang
> <haiyangz@microsoft.com>; Stephen Hemminger <sthemmin@microsoft.com>;
> devel@linuxdriverproject.org; linux-kernel@vger.kernel.org; Paul Meyer
> <Paul.Meyer@microsoft.com>
> Subject: Re: [PATCH] hv: kvp: Avoid reading past allocated blocks from KVP file
> 
> On Mon, Oct 30, 2017 at 05:08:03PM -0700, Long Li wrote:
> > From: Paul Meyer <Paul.Meyer@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).
> 
> Please wrap changelogs at 72 columns like your editor asked you to...

I will fix it.

> 
> >
> > Fix this by reading the correct number of KVP records from file each time.
> >
> > Signed-off-by: Paul Meyer <Paul.Meyer@microsoft.com>
> > ---
> 
> Why is your name not also on the signed-off-by chain if you are forwarding on a
> patch from someone else?
> 
> Is this patch also needed on stable kernels?

I'm sending on behalf of Paul Meyer. I will add a "Reviewed-by:" tag.

Yes it should also go stable. Will send v2 to include that.

> 
> thanks,
> 
> greg k-h

  reply	other threads:[~2017-10-31 18:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-31  0:08 [PATCH] hv: kvp: Avoid reading past allocated blocks from KVP file Long Li
2017-10-31  8:42 ` Greg KH
2017-10-31 18:10   ` Long Li [this message]
2017-10-31 19:42     ` Greg KH
2017-10-31 20:01       ` Long Li
2017-10-31 19:00 Long Li
2017-10-31 20:04 ` Long Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MWHPR21MB0190C9F2DCD0D34F2295D865CE5E0@MWHPR21MB0190.namprd21.prod.outlook.com \
    --to=longli@microsoft.com \
    --cc=Paul.Meyer@microsoft.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=haiyangz@microsoft.com \
    --cc=kys@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sthemmin@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).