From mboxrd@z Thu Jan 1 00:00:00 1970 Reply-To: kernel-hardening@lists.openwall.com Date: Mon, 28 Nov 2016 13:48:46 +0100 From: Peter Zijlstra Message-ID: <20161128124846.GL3174@twins.programming.kicks-ass.net> References: <2236FBA76BA1254E88B949DDB74E612B41C1884B@IRSMSX102.ger.corp.intel.com> <20161128121347.GY3092@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161128121347.GY3092@twins.programming.kicks-ass.net> Subject: [kernel-hardening] Re: Conversion from atomic_t to refcount_t: summary of issues To: "Reshetova, Elena" Cc: "kernel-hardening@lists.openwall.com" , Greg KH , Kees Cook , "will.deacon@arm.com" , Boqun Feng , Hans Liljestrand , David Windsor , aik@ozlabs.ru, david@gibson.dropbear.id.au List-ID: On Mon, Nov 28, 2016 at 01:13:47PM +0100, Peter Zijlstra wrote: > > > - if (atomic_add_unless(&inode->i_count, -1, 1)) (typical for fs and other code) > Many instances are variants of dec_and_lock/dec_and_mutex_lock(), like for example the one in put_css_set(). However, there are a few, like in super.c and in XFS that are more complex, but I have too much of a head-ache to actually think about that atm.