lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130927054712.GB6597@gmail.com>
Date:	Fri, 27 Sep 2013 07:47:12 +0200
From:	Ingo Molnar <mingo@...nel.org>
To:	John Stultz <john.stultz@...aro.org>
Cc:	Eric Dumazet <eric.dumazet@...il.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Peter Zijlstra <peterz@...radead.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	"David S. Miller" <davem@...emloft.net>,
	Alexey Kuznetsov <kuznet@....inr.ac.ru>,
	James Morris <jmorris@...ei.org>,
	Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
	Patrick McHardy <kaber@...sh.net>
Subject: Re: [PATCH 4/4] [RFC] ipv6: Fix for possible ipv6 seqlock deadlock


* John Stultz <john.stultz@...aro.org> wrote:

> On 09/26/2013 12:30 PM, Eric Dumazet wrote:
> > On Thu, 2013-09-26 at 11:34 -0700, John Stultz wrote:
> >> While enabling lockdep on seqlocks, I ran accross the warning below
> >> caused by the ipv6 stats being updated in both irq and non-irq context.
> >>
> >> This is a novice attempt to correct the issue, and with this patch
> >> the warning goes away. Any better solutions would be appreciated!
> > ...
> >
> >>  
> >>  out_err_release:
> >> -	if (err == -ENETUNREACH)
> >> +	if (err == -ENETUNREACH) {
> >> +		unsigned long flags;
> >> +		/* some of the stats are locked in irq context */
> >> +		local_irq_save(flags);
> >>  		IP6_INC_STATS_BH(net, NULL, IPSTATS_MIB_OUTNOROUTES);
> >> +		local_irq_restore(flags);
> >> +	}
> >>  	dst_release(*dst);
> >>  	*dst = NULL;
> >>  	return err;
> > You better change IP6_INC_STATS_BH() to IP6_INC_STATS()
> >
> > On x86 for example, no extra code will be generated (no need to disable
> > hard or soft irqs)
> 
> Ah, thanks! Verified it resolves the warning as well, so I've changed my
> patch to use your suggestion.

Btw., is this a deadlock that could occur upstream? If yes then adding a 
Cc: <stable@...nel.org> tag might be warranted.

Thanks,

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ