Re: [PATCH v2] Convert struct pid count to refcount_t

2019-07-01 Thread Joel Fernandes
On Mon, Jul 1, 2019 at 2:47 PM kbuild test robot wrote: > > Hi "Joel, > > Thank you for the patch! Perhaps something to improve: > > [auto build test WARNING on linus/master] > [also build test WARNING on v5.2-rc6] > [cannot apply to next-20190625] > [if your patch is applied to the wrong git

Re: [PATCH v2] Convert struct pid count to refcount_t

2019-07-01 Thread kbuild test robot
Hi "Joel, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v5.2-rc6] [cannot apply to next-20190625] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url:

Re: [PATCH v2] Convert struct pid count to refcount_t

2019-07-01 Thread Joel Fernandes
On Mon, Jul 01, 2019 at 07:48:26PM +0200, Jann Horn wrote: > On Fri, Jun 28, 2019 at 9:35 PM Joel Fernandes (Google) > wrote: > > struct pid's count is an atomic_t field used as a refcount. Use > > refcount_t for it which is basically atomic_t but does additional > > checking to prevent

Re: [PATCH v2] Convert struct pid count to refcount_t

2019-07-01 Thread Jann Horn
On Fri, Jun 28, 2019 at 9:35 PM Joel Fernandes (Google) wrote: > struct pid's count is an atomic_t field used as a refcount. Use > refcount_t for it which is basically atomic_t but does additional > checking to prevent use-after-free bugs. [...] > struct pid > { > - atomic_t count; > +

Re: [PATCH v2] Convert struct pid count to refcount_t

2019-06-28 Thread Kees Cook
On Fri, Jun 28, 2019 at 03:34:42PM -0400, Joel Fernandes (Google) wrote: > struct pid's count is an atomic_t field used as a refcount. Use > refcount_t for it which is basically atomic_t but does additional > checking to prevent use-after-free bugs. > > For memory ordering, the only change is

[PATCH v2] Convert struct pid count to refcount_t

2019-06-28 Thread Joel Fernandes (Google)
struct pid's count is an atomic_t field used as a refcount. Use refcount_t for it which is basically atomic_t but does additional checking to prevent use-after-free bugs. For memory ordering, the only change is with the following: - if ((atomic_read(>count) == 1) || -