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]
Date:	Thu, 11 Sep 2008 09:22:26 -0600
From:	Jonathan Corbet <corbet@....net>
To:	unlisted-recipients:; (no To-header on input)
Cc:	linux-kernel@...r.kernel.org, Jarod Wilson <jwilson@...hat.com>,
	Janne Grunau <j@...nau.net>,
	Christoph Bartelmus <lirc@...telmus.de>
Subject: Re: [PATCH 09/18] lirc driver for the Streamzap PC Receiver

[Yes, you said I shouldn't do more reviews of the posted code, but the
following was already pretty much written.  I really only found one thing
in this driver, and I suspect it may not have been addressed yet.  

This was set to be the last anyway, I'm pretty much out of time for now.]

jon

I'm curious about the following function:

> +static void stop_timer(struct usb_streamzap *sz)
> +{
> +	unsigned long flags;
> +
> +	spin_lock_irqsave(&sz->timer_lock, flags);
> +	if (sz->timer_running) {

What happens if the timer fires right here?  

> +		sz->timer_running = 0;
> +		del_timer_sync(&sz->delay_timer);
> +	}
> +	spin_unlock_irqrestore(&sz->timer_lock, flags);
> +}

The timer acquires the lock too, so this looks a bit like a deadlock to
me.  Probably del_timer_sync() should be called without the lock?
--
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