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]
Date:   Fri, 7 Jul 2017 18:15:10 +0200
From:   David Sterba <dsterba@...e.cz>
To:     Goldwyn Rodrigues <rgoldwyn@...e.de>
Cc:     linux-btrfs@...r.kernel.org, linux-block@...r.kernel.org,
        markus@...ppelsdorf.de, linux-kernel@...r.kernel.org,
        axboe@...nel.dk, dsterba@...e.com, marc.c.dionne@...il.com,
        Goldwyn Rodrigues <rgoldwyn@...e.com>
Subject: Re: [PATCH v2] btrfs: Correct assignment of pos

On Tue, Jul 04, 2017 at 10:33:07PM -0500, Goldwyn Rodrigues wrote:
> From: Goldwyn Rodrigues <rgoldwyn@...e.com>
> 
> Assigning pos for usage early messes up in append mode, where
> the pos is re-assigned in generic_write_checks(). Assign
> pos later to get the correct position to write from iocb->ki_pos.
> 
> Since check_can_nocow also uses the value of pos, we shift
> generic_write_checks() before check_can_nocow(). Checks with
> IOCB_DIRECT are present in generic_write_checks(), so checking
> for IOCB_NOWAIT is enough.
> 
> Also, put locking sequence in the fast path.
> 
> Changes since v1:
>  - Moved pos higher up to encompass check_can_nocow() call.
> 
> Fixes: edf064e7c6fe ("btrfs: nowait aio support")
> Signed-off-by: Goldwyn Rodrigues <rgoldwyn@...e.com>

Acked-by: David Sterba <dsterba@...e.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ