From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out5-smtp.messagingengine.com ([66.111.4.29]:36823 "EHLO out5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754465AbcA0RNF (ORCPT ); Wed, 27 Jan 2016 12:13:05 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 170DB29140 for ; Wed, 27 Jan 2016 12:13:04 -0500 (EST) Date: Wed, 27 Jan 2016 09:13:02 -0800 From: Greg KH To: Avi Kivity Cc: Jan Kara , axboe@kernel.dk, linux-fsdevel@vger.kernel.org, Jeff Moyer , stable@vger.kernel.org, Steven Whitehouse Subject: Re: [PATCH] direct-io: Fix negative return from dio read beyond eof Message-ID: <20160127171302.GA2943@kroah.com> References: <1447964734-16010-1-git-send-email-jack@suse.cz> <56A89E16.3060706@scylladb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56A89E16.3060706@scylladb.com> Sender: stable-owner@vger.kernel.org List-ID: On Wed, Jan 27, 2016 at 12:38:14PM +0200, Avi Kivity wrote: > On 11/19/2015 10:25 PM, Jan Kara wrote: > >Assume a filesystem with 4KB blocks. When a file has size 1000 bytes and > >we issue direct IO read at offset 1024, blockdev_direct_IO() reads the > >tail of the last block and the logic for handling short DIO reads in > >dio_complete() results in a return value -24 (1000 - 1024) which > >obviously confuses userspace. > > > >Fix the problem by bailing out early once we sample i_size and can > >reliably check that direct IO read starts beyond i_size. > > > >Reported-by: Avi Kivity > >Fixes: 9fe55eea7e4b444bafc42fa0000cc2d1d2847275 > >CC: stable@vger.kernel.org > > While this patch made it into upstream, it did not appear in 4.3.4. Did it > slip through the proverbial cracks? Can it be queued for 4.3.5? There are over 400 patches right now in my queue that haven't made it into a 4.3.x kernel. These are in the queue, in good company :) I'll go dig these out as I guess people care about them more than others... thanks, greg k-h