lkml.org 
[lkml]   [2009]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -tip] x86: reboot_fixup_32.c add missing pci_dev_put
On 12/03/2009 01:14 AM, Ingo Molnar wrote:
>
> * H. Peter Anvin<hpa@zytor.com> wrote:
>
>> On 12/02/2009 02:09 AM, Ingo Molnar wrote:
>>>
>>> * Xiaotian Feng<dfeng@redhat.com> wrote:
>>>
>>>> pci_get_device increments reference count to the found pci device,
>>>> that should be decremented using pci_dev_put.
>>>
>>>> +++ b/arch/x86/kernel/reboot_fixups_32.c
>>>> @@ -80,6 +80,7 @@ void mach_reboot_fixups(void)
>>>> continue;
>>>>
>>>> cur->reboot_fixup(dev);
>>>> + pci_dev_put(dev);
>>>
>>> Does this matter in practice? We are about to reboot. (but if it's
>>> cleaner to do it like this or if there's some real bug fixed by this
>>> then please spell it out in the changelog.)
>>>
>>
>> Even if it doesn't actually matter, doing things cleanly makes it
>> easier to handle failure scenarios, possibly that are discovered in
>> the future.
>
> certainly - but it would be nice to know whether there's any other
> reason for this but cleanliness/consistency.

Just for consistency:-) pci_get_device will increase the ref count of
found device,
then we should use pci_dev_put to decrease the ref count although we're
going to reset soon.
I should point out this in my changelog, sorry for the unclear changelog.

>
> Ingo
>



\
 
 \ /
  Last update: 2009-12-03 11:11    [W:0.046 / U:1.360 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site