x86: reboot_fixup_32.c add missing pci_dev_put
PATCH 1/1 x86: reboot_fixup_32.c add missing pci_dev_put
pci_get_device increments reference count to the found pci device, that should be decremented using pci_dev_put.
--- arch/x86/kernel/reboot_fixups_32.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/x86/kernel/reboot_fixups_32.c +1 -0
@@ -80,6 +80,7 @@ void mach_reboot_fixups(void)continue ; cur->reboot_fixup (dev); +pci_dev_put (dev); } }
Signature · 1 line
1.6.5.2
arch/x86/kernel/reboot_fixups_32.c void mach_reboot_fixups(void) · line 83
Quoted 9 lines · Xiaotian Feng
pci_get_deviceincrements reference count to the found pci device, that should be decremented usingpci_dev_put.+++
b/arch/x86/kernel/reboot_fixups_32.carch/x86/kernel/reboot_fixups_32.c +1
-0@@ -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.)
Ingo
H. Peter Anvin
reviewerQuoted 10 lines · Ingo Molnar
Quoted 7 lines · Xiaotian Feng
pci_get_deviceincrements reference count to the found pci device, that should be decremented usingpci_dev_put.+++
b/arch/x86/kernel/reboot_fixups_32.carch/x86/kernel/reboot_fixups_32.c +0
-0@@ -80,6 +80,7 @@ void mach_reboot_fixups(void)continue ;
Quoted 7 lines
arch/x86/kernel/reboot_fixups_32.c void mach_reboot_fixups(void) · line 83
Quoted 2 lines
arch/x86/kernel/reboot_fixups_32.c +1
-0cur->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.
-hpa
Signature · 2 lines
H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf.
Quoted 19 lines · H. Peter Anvin
Quoted 10 lines · Ingo Molnar
Quoted 7 lines · Xiaotian Feng
pci_get_deviceincrements reference count to the found pci device, that should be decremented usingpci_dev_put.+++
b/arch/x86/kernel/reboot_fixups_32.carch/x86/kernel/reboot_fixups_32.c +0
-0@@ -80,6 +80,7 @@ void mach_reboot_fixups(void)continue ;Quoted 7 lines
arch/x86/kernel/reboot_fixups_32.c void mach_reboot_fixups(void) · line 83
Quoted 2 lines
arch/x86/kernel/reboot_fixups_32.c +1
-0cur->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.)
Quoted 3 lines
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.
Ingo
Quoted 22 lines · Ingo Molnar
Quoted 19 lines · H. Peter Anvin
Quoted 17 lines · Ingo Molnar
arch/x86/kernel/reboot_fixups_32.c void mach_reboot_fixups(void) · line 83
Quoted 9 lines · Xiaotian Feng
pci_get_deviceincrements reference count to the found pci device, that should be decremented usingpci_dev_put.+++
b/arch/x86/kernel/reboot_fixups_32.carch/x86/kernel/reboot_fixups_32.c +1
-0@@ -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.)
Quoted 6 lines
Quoted 3 lines
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.
Quoted 3 lines
Ingo
Quoted 2 lines · Danny Feng
I should point out this in my changelog, sorry for the unclear changelog.
Please re-send it with a better changelog.
Thanks,
Ingo
PATCH 1/1 x86/trivial: add pci_dev_put in reboot_fixup_32.c for consistency
pci_get_device will increase the ref count of found device. Although we're going to reset soon, we should use pci_dev_put to decrease the ref count for consistency.
--- arch/x86/kernel/reboot_fixups_32.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/x86/kernel/reboot_fixups_32.c +1 -0
@@ -80,6 +80,7 @@ void mach_reboot_fixups(void)continue ; cur->reboot_fixup (dev); +pci_dev_put (dev); } }
Signature · 1 line
1.5.5.6
[tip:x86/reboot] x86/reboot: Add pci_dev_put in reboot_fixup_32.c for consistency
Commit-ID: 57fea8f7ab67ef42b7f84999e49e47f8717a2d5b Gitweb: http://git.kernel.org/tip/57fea8f7ab67ef42b7f84999e49e47f8717a2d5b Author: Xiaotian Feng <[email protected]> AuthorDate: Thu, 3 Dec 2009 19:06:40 +0800 Committer: Ingo Molnar <[email protected]> CommitDate: Thu, 3 Dec 2009 12:17:55 +0100
x86/reboot: Add pci_dev_put in reboot_fixup_32.c for consistency
pci_get_device will increase the ref count of found device. Although we're going to reset soon, we should use pci_dev_put to decrease the ref count for consistency.
LKML-Reference: <[email protected]>
--- arch/x86/kernel/reboot_fixups_32.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
arch/x86/kernel/reboot_fixups_32.c +1 -0
@@ -80,6 +80,7 @@ void mach_reboot_fixups(void)continue ; cur->reboot_fixup (dev); +pci_dev_put (dev); } }