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, 13 Nov 2014 18:07:56 +0800
From:	Charles Chiou <ch1102chiou@...il.com>
To:	Christoph Hellwig <hch@...radead.org>, linux-scsi@...r.kernel.org,
	linux-kernel@...r.kernel.org
CC:	JBottomley@...allels.com, linux-pm@...r.kernel.org
Subject: Re: [V2 PATCH 3/4] scsi:stex.c Add reboot support



On 11/13/2014 01:27 AM, Christoph Hellwig wrote:
>> +static int stex_reboot_callback(struct notifier_block *self,
>> +							  unsigned long val,
>> +							  void *data)
>> +{
>> +	if (val == SYS_RESTART)
>> +		isRestart = 1;
>> +	return NOTIFY_OK;
>> +}
>>
>> @@ -1832,7 +1859,14 @@ static void stex_shutdown(struct pci_dev *pdev)
>>   {
>>   	struct st_hba *hba = pci_get_drvdata(pdev);
>>
>> -	stex_hba_stop(hba);
>> +	if (hba->yellowstone == 1)
>> +		stex_hba_stop(hba, ST_IGNORED);
>> +	else {
>> +		if (isRestart)
>> +			stex_hba_stop(hba, ST_S6);
>> +		else
>> +			stex_hba_stop(hba, ST_S5);
>> +	}
>
> This sort of check for reboot vs restart isn't really something
> we want in drivers.  I don't really know how we could find this
> out assuming we even want drivers to behave differently.
>
> Maybe Greg or someone on lkml has an idea how to best handle this case.
>


I have no idea to distinguish OS is going to reboot or shut down without 
this approach. I'll try to find it out.
Charles
--
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