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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20110510080030.GA13420@infradead.org>
Date:	Tue, 10 May 2011 04:00:30 -0400
From:	Christoph Hellwig <hch@...radead.org>
To:	Mikulas Patocka <mikulas@...ax.karlin.mff.cuni.cz>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH 2/14] HPFS: Introduce a global mutex and lock it on every
 callback from VFS.

>  static inline void hpfs_lock(struct super_block *s)
>  {
> +	struct hpfs_sb_info *sbi = hpfs_sb(s);
> +	mutex_lock(&sbi->hpfs_mutex);
>  }
>  
>  static inline void hpfs_unlock(struct super_block *s)
>  {
> +	struct hpfs_sb_info *sbi = hpfs_sb(s);
> +	mutex_unlock(&sbi->hpfs_mutex);
> +}
> +
> +static inline void hpfs_lock_assert(struct super_block *s)
> +{
> +	struct hpfs_sb_info *sbi = hpfs_sb(s);
> +	WARN_ON(!mutex_is_locked(&sbi->hpfs_mutex));
>  }

These locks just obsfucate what's going on.  Just call the mutex
helpers directly.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ