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: <A24693684029E5489D1D202277BE89447382A55A@dlee02.ent.ti.com>
Date:	Tue, 16 Nov 2010 10:57:02 -0600
From:	"Aguirre, Sergio" <saaguirre@...com>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
CC:	LKML <linux-kernel@...r.kernel.org>,
	Huang Ying <ying.huang@...el.com>,
	Martin Schwidefsky <schwidefsky@...ibm.com>,
	Ingo Molnar <mingo@...e.hu>, Kyle McMartin <kyle@...artin.ca>
Subject: RE: [RFC][PATCH] irq_work: Don't ignore possible cmpxchg failure

Hi Peter,

> -----Original Message-----
> From: Peter Zijlstra [mailto:a.p.zijlstra@...llo.nl]
> Sent: Tuesday, November 16, 2010 10:45 AM
> To: Aguirre, Sergio
> Cc: LKML; Huang Ying; Martin Schwidefsky; Ingo Molnar; Kyle McMartin
> Subject: Re: [RFC][PATCH] irq_work: Don't ignore possible cmpxchg failure
> 
> On Tue, 2010-11-16 at 10:32 -0600, Sergio Aguirre wrote:
> > Although is very unlikely, it's better to make sure we're not
> > letting this happen.
> >
> > This solves this compilation warning:
> >
> > kernel/irq_work.c: In function 'irq_work_run':
> > kernel/irq_work.c:148: warning: value computed is not used
> >
> 
> > @@ -145,7 +145,10 @@ void irq_work_run(void)
> >  		 * Clear the BUSY bit and return to the free state if
> >  		 * no-one else claimed it meanwhile.
> >  		 */
> > -		cmpxchg(&entry->next, next_flags(NULL, IRQ_WORK_BUSY), NULL);
> > +		xchgres = cmpxchg(&entry->next,
> > +				  next_flags(NULL, IRQ_WORK_BUSY),
> > +				  NULL);
> > +		BUG_ON(unlikely(xchgres != next_flags(NULL, IRQ_WORK_BUSY)));
> 
> simply adding (void) in front would be much easier.

But isn't that still leaving the remote possibility of a hidden cmpxchg
Failure open?

Regards,
Sergio
--
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