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: <c3c10b04f1576ecfa7aace3a23d92dbd@agner.ch>
Date:   Sun, 16 Sep 2018 21:04:04 -0700
From:   Stefan Agner <stefan@...er.ch>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        Jens Axboe <axboe@...nel.dk>,
        Sasha Levin <alexander.levin@...rosoft.com>
Subject: Re: [PATCH 4.18 082/197] block: dont warn for flush on read-only
 device

Hi Greg,

The follow up patch 8b2ded1c94c0 ("block: don't warn when doing fsync on read-only devices") should get applied too, since it correctly fixes what this patch tried to fix.

--
Stefan

On 13.09.2018 06:30, Greg Kroah-Hartman wrote:
> 4.18-stable review patch.  If anyone has any objections, please let me know.
> 
> ------------------
> 
> From: Jens Axboe <axboe@...nel.dk>
> 
> [ Upstream commit b089cfd95d32638335c551651a8e00fd2c4edb0b ]
> 
> Don't warn for a flush issued to a read-only device. It's not strictly
> a writable command, as it doesn't change any on-media data by itself.
> 
> Reported-by: Stefan Agner <stefan@...er.ch>
> Fixes: 721c7fc701c7 ("block: fail op_is_write() requests to read-only partitions")
> Signed-off-by: Jens Axboe <axboe@...nel.dk>
> Signed-off-by: Sasha Levin <alexander.levin@...rosoft.com>
> Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> ---
>  block/blk-core.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> --- a/block/blk-core.c
> +++ b/block/blk-core.c
> @@ -2159,7 +2159,9 @@ static inline bool should_fail_request(s
>  
>  static inline bool bio_check_ro(struct bio *bio, struct hd_struct *part)
>  {
> -	if (part->policy && op_is_write(bio_op(bio))) {
> +	const int op = bio_op(bio);
> +
> +	if (part->policy && (op_is_write(op) && !op_is_flush(op))) {
>  		char b[BDEVNAME_SIZE];
>  
>  		WARN_ONCE(1,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ