Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 16 Dec 2016 15:01:58 +0100
From: Peter Zijlstra <>
To: "Reshetova, Elena" <>
Cc: Liljestrand Hans <>,
	"" <>,
	Greg KH <>,
	Kees Cook <>,
	"" <>,
	Boqun Feng <>,
	David Windsor <>, "" <>,
	"" <>
Subject: Re: Conversion from atomic_t to refcount_t: summary of issues

On Fri, Dec 16, 2016 at 12:10:21PM +0000, Reshetova, Elena wrote:

> Is it ok to add at least refcount_inc_if_zero() ? 

Of course not.

> We already have refcount_dec_if_one(), reffcount_dec_not_one() and
> refcount_inc_not_zero(), so this one is the only missing one and would
> greatly help in couple of cases. 

No, its absolutely insane. 0 means its freed, you cannot get another
reference at that point.

If you have code that relies on that, its broken.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.