Re: [PATCH -v2 4/6] locking, arch: Update spin_unlock_wait()

2016-05-27 Thread Chris Metcalf
On 5/27/2016 5:05 AM, Peter Zijlstra wrote: On Thu, May 26, 2016 at 05:10:36PM -0400, Chris Metcalf wrote: On 5/26/2016 10:19 AM, Peter Zijlstra wrote: --- a/arch/tile/lib/spinlock_32.c +++ b/arch/tile/lib/spinlock_32.c @@ -72,10 +72,14 @@ void arch_spin_unlock_wait(arch_spinlock if

[PATCH nf] netfilter: nf_tables: validate NFTA_SET_TABLE parameter

2016-05-27 Thread Phil Turnbull
If the NFTA_SET_TABLE parameter is missing and the NLM_F_DUMP flag is not set, then a NULL pointer dereference is triggered in nf_tables_set_lookup because ctx.table is NULL. Signed-off-by: Phil Turnbull --- net/netfilter/nf_tables_api.c | 2 ++ 1 file changed, 2

[PATCH 1/2 libnftnl] set_elem: Copy user data memory

2016-05-27 Thread Carlos Falgueras García
All attributes are passed by copy, so user data should be copied too. Signed-off-by: Carlos Falgueras García --- src/set_elem.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/set_elem.c b/src/set_elem.c index 990be24..b9c7e1e 100644 ---

[PATCH 2/2 nft] set_elem: Use libnftnl/udata to store set element comment

2016-05-27 Thread Carlos Falgueras García
The set element comment is stored in nftnl_set_elem->user.data using libnftnl/udata infrastructure. This allows store multiple variable length user data into set element. Signed-off-by: Carlos Falgueras García --- src/netlink.c | 50

Re: [PATCH -v2 4/6] locking, arch: Update spin_unlock_wait()

2016-05-27 Thread Peter Zijlstra
On Thu, May 26, 2016 at 05:10:36PM -0400, Chris Metcalf wrote: > On 5/26/2016 10:19 AM, Peter Zijlstra wrote: > >--- a/arch/tile/lib/spinlock_32.c > >+++ b/arch/tile/lib/spinlock_32.c > >@@ -72,10 +72,14 @@ void arch_spin_unlock_wait(arch_spinlock > > if (next == curr) > > return;

Re: [PATCH -v2 4/6] locking, arch: Update spin_unlock_wait()

2016-05-27 Thread Peter Zijlstra
On Fri, May 27, 2016 at 08:46:49AM +0200, Martin Schwidefsky wrote: > > This fixes a number of spin_unlock_wait() users that (not > > unreasonably) rely on this. > > All that is missing is an smp_rmb(), no? Indeed. > > --- a/arch/s390/include/asm/spinlock.h > > +++

Re: [PATCH -v2 4/6] locking, arch: Update spin_unlock_wait()

2016-05-27 Thread Martin Schwidefsky
On Thu, 26 May 2016 16:19:26 +0200 Peter Zijlstra wrote: > This patch updates/fixes all spin_unlock_wait() implementations. > > The update is in semantics; where it previously was only a control > dependency, we now upgrade to a full load-acquire to match the >