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, 9 Jun 2011 13:00:02 +0100
From:	Ian Abbott <abbotti@....co.uk>
To:	"Prashant P. Shah" <pshah.mumbai@...il.com>
CC:	"devel@...uxdriverproject.org" <devel@...uxdriverproject.org>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	Frank Mori Hess <fmhess@...rs.sourceforge.net>,
	Ian Abbott <ian.abbott@....co.uk>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] Staging: comedi: dyna_pci10xx: replace semaphore with
 mutex

On 09/06/11 12:52, Prashant P. Shah wrote:
> -	sema_init(&devpriv->sem, 1);
> +	mutex_init(&devpriv->mutex);
>  	dev->board_ptr = &boardtypes[board_index];
>  	devpriv->pci_dev = pcidev;

You could call mutex_destroy() in your _detach routine as well.  It's
used for debugging mutexes:

static int dyna_pci10xx_detach(struct comedi_device *dev)
{
	if (devpriv && devpriv->pci_dev) {
		comedi_pci_disable(devpriv->pci_dev);
		mutex_destroy(&devpriv->mutex);
	}
	return 0;
}

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@....co.uk>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-
--
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