lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c57bf8a7-fb0d-1a53-814d-bb4fba4b246b@kernel.dk>
Date:   Tue, 4 Jul 2017 16:16:52 -0600
From:   Jens Axboe <axboe@...nel.dk>
To:     Goldwyn Rodrigues <rgoldwyn@...e.de>,
        Markus Trippelsdorf <markus@...ppelsdorf.de>,
        linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-btrfs@...r.kernel.org
Cc:     David Sterba <dsterba@...e.com>
Subject: Re: Commit edf064e7c (btrfs: nowait aio support) breaks shells

On 07/04/2017 09:31 AM, Goldwyn Rodrigues wrote:
> 
> 
> On 07/04/2017 02:45 AM, Markus Trippelsdorf wrote:
>> On 2017.07.04 at 06:23 +0200, Markus Trippelsdorf wrote:
>>> commit edf064e7c6fec3646b06c944a8e35d1a3de5c2c3 (HEAD, refs/bisect/bad)
>>> Author: Goldwyn Rodrigues <rgoldwyn@...e.com>
>>> Date:   Tue Jun 20 07:05:49 2017 -0500
>>>
>>>     btrfs: nowait aio support
>>>
>>> apparently breaks several shell related features on my system.
>>
>> Here is a simple testcase:
>>
>>  % echo "foo" >> test
>>  % echo "foo" >> test
>>  % cat test
>>  foo
>>  %
>>
> 
> Thanks for testing.
> Yes, pos must be set with iocb->ki_pos for appends. I should not have
> removed the initialization. Could you try this patch?
> 
> diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
> index 59e2dccdf75b..7947781229e5 100644
> --- a/fs/btrfs/file.c
> +++ b/fs/btrfs/file.c
> @@ -1931,6 +1931,7 @@ static ssize_t btrfs_file_write_iter(struct kiocb
> *iocb,
>  	 */
>  	update_time_for_write(inode);
> 
> +	pos = iocb->ki_pos;
>  	start_pos = round_down(pos, fs_info->sectorsize);
>  	oldsize = i_size_read(inode);
>  	if (start_pos > oldsize) {

Please expedite getting this upstream, asap.

-- 
Jens Axboe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ