All of lore.kernel.org
 help / color / mirror / Atom feed
From: Danny Feng <dfeng@redhat.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Yinghai Lu <yinghai@kernel.org>
Subject: Re: [PATCH -tip] x86: reboot_fixup_32.c add missing pci_dev_put
Date: Thu, 03 Dec 2009 18:07:21 +0800	[thread overview]
Message-ID: <4B178DD9.7040502@redhat.com> (raw)
In-Reply-To: <20091202171422.GB28061@elte.hu>

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
>


  reply	other threads:[~2009-12-03 10:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-27  3:16 [PATCH -tip] x86: reboot_fixup_32.c add missing pci_dev_put Xiaotian Feng
2009-12-02 10:09 ` Ingo Molnar
2009-12-02 16:51   ` H. Peter Anvin
2009-12-02 17:14     ` Ingo Molnar
2009-12-03 10:07       ` Danny Feng [this message]
2009-12-03 10:40         ` Ingo Molnar
2009-12-03 11:06           ` [PATCH -tip] x86/trivial: add pci_dev_put in reboot_fixup_32.c for consistency Xiaotian Feng
2009-12-03 13:23             ` [tip:x86/reboot] x86/reboot: Add " tip-bot for Xiaotian Feng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B178DD9.7040502@redhat.com \
    --to=dfeng@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=yinghai@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.