From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751565AbdJaIml (ORCPT ); Tue, 31 Oct 2017 04:42:41 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:60720 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751095AbdJaImj (ORCPT ); Tue, 31 Oct 2017 04:42:39 -0400 Date: Tue, 31 Oct 2017 09:42:48 +0100 From: Greg KH To: Long Li Cc: "K . Y . Srinivasan" , Haiyang Zhang , Stephen Hemminger , devel@linuxdriverproject.org, linux-kernel@vger.kernel.org, Paul Meyer Subject: Re: [PATCH] hv: kvp: Avoid reading past allocated blocks from KVP file Message-ID: <20171031084248.GA11479@kroah.com> References: <20171031000803.11571-1-longli@exchange.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171031000803.11571-1-longli@exchange.microsoft.com> 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 Mon, Oct 30, 2017 at 05:08:03PM -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). Please wrap changelogs at 72 columns like your editor asked you to... > > Fix this by reading the correct number of KVP records from file each time. > > Signed-off-by: Paul Meyer > --- 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? thanks, greg k-h