Re: [PATCH] netfilter: nat: Do not use ARRAY_SIZE() on spinlocks to fix zero div

2017-09-18 Thread Pablo Neira Ayuso
On Sun, Sep 10, 2017 at 01:41:41PM +0200, Geert Uytterhoeven wrote: > If no spinlock debugging options (CONFIG_GENERIC_LOCKBREAK, > CONFIG_DEBUG_SPINLOCK, CONFIG_DEBUG_LOCK_ALLOC) are enabled on a UP > platform (e.g. m68k defconfig), arch_spinlock_t is an empty struct, > hence using

[PATCH] netfilter: nat: Do not use ARRAY_SIZE() on spinlocks to fix zero div

2017-09-10 Thread Geert Uytterhoeven
If no spinlock debugging options (CONFIG_GENERIC_LOCKBREAK, CONFIG_DEBUG_SPINLOCK, CONFIG_DEBUG_LOCK_ALLOC) are enabled on a UP platform (e.g. m68k defconfig), arch_spinlock_t is an empty struct, hence using ARRAY_SIZE(nf_nat_locks) causes a division by zero: net/netfilter/nf_nat_core.c: In