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: <4686DC81.5090908@garzik.org>
Date:	Sat, 30 Jun 2007 18:43:13 -0400
From:	Jeff Garzik <jeff@...zik.org>
To:	Michael Buesch <mb@...sch.de>
CC:	dhananjay.phadke@...il.com, netdev@...r.kernel.org, rob@...xen.com,
	Milan Bag <mbag@...xen.com>, Wen Xiong <wenxiong@...ibm.com>
Subject: Re: [PATCH 3/3] NetXen: Graceful teardown of interface and hardware
 upon module unload

Michael Buesch wrote:
> On Saturday 30 June 2007 22:38:47 dhananjay.phadke@...il.com wrote:
>> These changes allow driver close routine to be called during module unload,
>> to clean-up buffers and other software resources, flush queues etc. Also,
>> hardware is reset to pristine state. 
>>
>> Signed-off-by: Dhananjay Phadke <dhananjay@...xen.com>
>> Signed-off-by: Milan Bag <mbag@...xen.com>
>> Signed-off-by: Wen Xiong <wenxiong@...ibm.com>
> 
>>  		off = netxen_nic_pci_set_window(adapter, memaddr);
>>  		addr = pci_base_offset(adapter, off);
>>  		writel(data, addr);
>> +		do {
>> +			if (readl(addr) == data)
>> +				break;
>> +			msleep_interruptible(100);
> 
> If you use msleep_interruptible(), I'd say you should check for
> the return value of that call and probably abort firmware
> processing here if a signal interrupted us.

While strictly this is true, I strongly urge the use of 
non-interruptible sleeps when used in hardware-related delays.  Very 
rarely does one really want to care about signals for such cases.

	Jeff


-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ