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] [day] [month] [year] [list]
Date:	Wed, 4 Jan 2012 09:43:37 -0800
From:	Daniel Halperin <dhalperi@...washington.edu>
To:	Larry Finger <Larry.Finger@...inger.net>
Cc:	John W Linville <linville@...driver.com>,
	torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org,
	chaoming_li@...lsil.com.cn, linux-wireless@...r.kernel.org
Subject: Re: [PATCH] rtl8192cu: Fix WARNING on suspend/resume

On Wed, Jan 4, 2012 at 9:14 AM, Larry Finger <Larry.Finger@...inger.net> wrote:
> On 01/04/2012 10:16 AM, Daniel Halperin wrote:
>>
>> Sorry, Larry, I didn't see this til it was included in John's mail this
>> morning.
>>
>> On Tue, Jan 3, 2012 at 10:39 AM, Larry Finger<Larry.Finger@...inger.net>
>>  wrote:
>>>
>>>
>>> +#ifdef CONFIG_PM
>>> +static int rtl8192cu_usb_suspend(struct usb_interface *pusb_intf,
>>> +                                pm_message_t message)
>>> +{
>>> +       /* Increase usage_count to Save loaded fw across suspend/resume
>>> */
>>> +       atomic_inc(&usage_count);
>>> +       return 0;
>>> +}
>>> +
>>> +static int rtl8192cu_usb_resume(struct usb_interface *pusb_intf)
>>> +{
>>> +       atomic_dec(&usage_count);       /* after resume, decrease usage
>>> count */
>>> +       return 0;
>>> +}
>>> +#endif
>>
>>
>> Based on the warning-fix I submitted yesterday, this probably produces
>> a warning if CONFIG_PM is set but not CONFIG_PM_SLEEP. My patch was
>> for an ethernet driver, but iwlwifi and ath5k appear to follow the
>> same pattern using CONFIG_PM_SLEEP instead of the above.
>>
>> See: http://www.spinics.net/lists/netdev/msg184717.html for the patch
>> and http://www.spinics.net/lists/netdev/msg184715.html for the
>> discussion.
>
>
> Thanks for the note. I will prepare a revised patch.
>
> What architecture gave the warning? Of x86_64, I was unable to get
> CONFIG_PM_SLEEP without CONFIG_PM.
>

x86-64. I realized that I actually explained this problem rather
clearly when I fixed it for iwlwifi 5 months ago. :)
https://github.com/mirrors/linux/commit/f090fba305658fe6e464e2fbd25fad81957ece26

"""
CC [M]  drivers/net/wireless/iwlwifi/iwl-pci.o
  drivers/net/wireless/iwlwifi/iwl-pci.c:506: warning:
‘iwl_pci_suspend’ defined but not used
  drivers/net/wireless/iwlwifi/iwl-pci.c:519: warning:
‘iwl_pci_resume’ defined but not used

These are only used if CONFIG_PM_SLEEP is enabled. CONFIG_PM depends
(CONFIG_PM_SLEEP || CONFIG_PM_RUNTIME), so it can be set without
CONFIG_PM_SLEEP selected.
"""

Dan
--
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