Re: [RFC PATCH v2 1/8] Use atomic type for ucounts reference counting

2021-01-13 Thread Kees Cook
On Wed, Jan 13, 2021 at 10:31:40AM -0600, Eric W. Biederman wrote: > Alexey Gladkov writes: > > We might want to use refcount_t instead of atomic_t. Not a big deal > either way. Yes, please use refcount_t, and don't use _read() since that introduces races. -Kees > > > Signed-off-by: Alexey

Re: [RFC PATCH v2 1/8] Use atomic type for ucounts reference counting

2021-01-13 Thread Eric W. Biederman
Alexey Gladkov writes: We might want to use refcount_t instead of atomic_t. Not a big deal either way. > Signed-off-by: Alexey Gladkov > --- > include/linux/user_namespace.h | 2 +- > kernel/ucount.c| 10 +- > 2 files changed, 6 insertions(+), 6 deletions(-) > > diff

[RFC PATCH v2 1/8] Use atomic type for ucounts reference counting

2021-01-10 Thread Alexey Gladkov
Signed-off-by: Alexey Gladkov --- include/linux/user_namespace.h | 2 +- kernel/ucount.c| 10 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h index 64cf8ebdc4ec..84fefa9247c4 100644 ---