From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [GIT PULL] for-2.6.32/bug-fixes Date: Tue, 17 May 2011 10:48:00 +0100 Message-ID: <4DD260700200007800041962@vpn.id2.novell.com> References: <20110516203535.GA871@dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <20110516203535.GA871@dumpdata.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Konrad Rzeszutek Wilk Cc: Jeremy Fitzhardinge , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org >>> On 16.05.11 at 22:35, Konrad Rzeszutek Wilk = wrote: > with xen-blkback wherein a barrier request would have been discarded = (and an error > returned) b/c the sector provided via the request was -1. The -1 sector = made > vbd_translate return an error (it checked the sector number against the = size of > the disk) and it would never go through trying to do a barrier. The = second bug-fix > is also in my devel/xen-blkback-v3.2 upstream tree. Is this really correct? You appear to assume that BLKIF_OP_WRITE_BARRIER always has no data, but the rest of the code in the driver (and the frontend) doesn't seem to imply that (see e.g. the check immediately following the switch statement your patch modifies). Hence shouldn't you clear the sector number only when req->nr_segments is zero? Or alternatively, shouldn't vbd_translate() simply not fail when req->nr_sects is zero? Additionally, looking at the check in vbd_translate(), wouldn't you think there ought to be overflow checking for the addition, too? Jan