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: <200610221346.53038.luca.risolia@studio.unibo.it>
Date:	Sun, 22 Oct 2006 13:46:52 +0200
From:	Luca Risolia <luca.risolia@...dio.unibo.it>
To:	Dave Jones <davej@...hat.com>,
	Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: sn9c10x list corruption in 2.6.18.1

Hello Dave.

> I found one area in the driver where we do list manipulation without any locking,
> but I'm not entirely convinced that this is the source of the bug yet.

Spinlocks are not necessary there, becouse that piece of code is already
isolated when running, to prevent concurrent accesses to the list from within 
the irq handler. The bug should be elsewhere (probably not in the driver).

Best regards
Luca


> > --- linux-2.6.18.noarch/drivers/media/video/sn9c102/sn9c102_core.c~	2006-10-21 22:57:32.000000000 -0400
> +++ linux-2.6.18.noarch/drivers/media/video/sn9c102/sn9c102_core.c	2006-10-21 22:58:43.000000000 -0400
> @@ -197,13 +197,16 @@ static void sn9c102_empty_framequeues(st
>  static void sn9c102_requeue_outqueue(struct sn9c102_device* cam)
>  {
>  	struct sn9c102_frame_t *i;
> +	unsigned long lock_flags;
>  
> +	spin_lock_irqsave(&cam->queue_lock, lock_flags);
>  	list_for_each_entry(i, &cam->outqueue, frame) {
>  		i->state = F_QUEUED;
>  		list_add(&i->frame, &cam->inqueue);
>  	}
>  
>  	INIT_LIST_HEAD(&cam->outqueue);
> +	spin_unlock_irqrestore(&cam->queue_lock, lock_flags);
>  }
-
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