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: <YpmsuIQhk+i8LShF@infradead.org>
Date:   Thu, 2 Jun 2022 23:39:52 -0700
From:   Christoph Hellwig <hch@...radead.org>
To:     Logan Gunthorpe <logang@...tatee.com>
Cc:     linux-kernel@...r.kernel.org, linux-raid@...r.kernel.org,
        Song Liu <song@...nel.org>,
        Christoph Hellwig <hch@...radead.org>,
        Donald Buczek <buczek@...gen.mpg.de>,
        Guoqing Jiang <guoqing.jiang@...ux.dev>,
        Xiao Ni <xni@...hat.com>, Stephen Bates <sbates@...thlin.com>,
        Martin Oliveira <Martin.Oliveira@...eticom.com>,
        David Sloan <David.Sloan@...eticom.com>
Subject: Re: [PATCH v3 04/11] md/raid5-cache: Take mddev_lock in
 r5c_journal_mode_show()

On Thu, Jun 02, 2022 at 12:18:10PM -0600, Logan Gunthorpe wrote:
>  	conf = mddev->private;
>  	if (!conf || !conf->log) {
> -		spin_unlock(&mddev->lock);
> +		mddev_unlock(mddev);
>  		return 0;
>  	}
>  
> @@ -2557,7 +2560,7 @@ static ssize_t r5c_journal_mode_show(struct mddev *mddev, char *page)
>  	default:
>  		ret = 0;
>  	}
> -	spin_unlock(&mddev->lock);
> +	mddev_unlock(mddev);
>  	return ret;

Using a goto out_unlock would be nice here to keep the critical
sections simple.  But even as-is this looks good:

Reviewed-by: Christoph Hellwig <hch@....de>

> +	lockdep_assert_held(&conf->mddev->reconfig_mutex);
> +

.. but this looks unrelated and misplaced in this patch.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ