All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>,
	Florian Westphal <fw@strlen.de>,
	"David S . Miller" <davem@davemloft.net>,
	Arnd Bergmann <arnd@arndb.de>,
	netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] netfilter: nat: Do not use ARRAY_SIZE() on spinlocks to fix zero div
Date: Mon, 18 Sep 2017 17:33:47 +0200	[thread overview]
Message-ID: <20170918153347.GA28198@salvia> (raw)
In-Reply-To: <1505043701-13255-1-git-send-email-geert@linux-m68k.org>

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 ARRAY_SIZE(nf_nat_locks) causes a division by zero:
> 
>     net/netfilter/nf_nat_core.c: In function ‘nf_nat_setup_info’:
>     net/netfilter/nf_nat_core.c:432: warning: division by zero
>     net/netfilter/nf_nat_core.c: In function ‘__nf_nat_cleanup_conntrack’:
>     net/netfilter/nf_nat_core.c:535: warning: division by zero
>     net/netfilter/nf_nat_core.c:537: warning: division by zero
>     net/netfilter/nf_nat_core.c: In function ‘nf_nat_init’:
>     net/netfilter/nf_nat_core.c:810: warning: division by zero
>     net/netfilter/nf_nat_core.c:811: warning: division by zero
>     net/netfilter/nf_nat_core.c:824: warning: division by zero
> 
> Fix this by using the CONNTRACK_LOCKS definition instead.

Applied.

      reply	other threads:[~2017-09-18 15:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-10 11:41 [PATCH] netfilter: nat: Do not use ARRAY_SIZE() on spinlocks to fix zero div Geert Uytterhoeven
2017-09-18 15:33 ` Pablo Neira Ayuso [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170918153347.GA28198@salvia \
    --to=pablo@netfilter.org \
    --cc=arnd@arndb.de \
    --cc=coreteam@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=fw@strlen.de \
    --cc=geert@linux-m68k.org \
    --cc=kadlec@blackhole.kfki.hu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.