Re: [PATCH] ocxl: fix pci device refcount leak when calling get_function_0()

2022-11-20 Thread Yang Yingliang
On 2022/11/21 14:31, Andrew Donnellan wrote: On Sat, 2022-11-19 at 22:44 +0800, Yang Yingliang wrote: As comment of pci_get_domain_bus_and_slot() says, it returns a pci device with refcount increment, so when finish using it, pci_dev_put() needs be called. In get_dvsec_vendor0(), in normal

Re: [PATCH] ocxl: fix pci device refcount leak when calling get_function_0()

2022-11-20 Thread Yang Yingliang
Hi, On 2022/11/21 14:28, Christophe Leroy wrote: Le 19/11/2022 à 15:44, Yang Yingliang a écrit : As comment of pci_get_domain_bus_and_slot() says, it returns a pci device with refcount increment, so when finish using it, pci_dev_put() needs be called. In get_dvsec_vendor0(), in normal path,

Re: [PATCH] ocxl: fix pci device refcount leak when calling get_function_0()

2022-11-20 Thread Andrew Donnellan
On Sat, 2022-11-19 at 22:44 +0800, Yang Yingliang wrote: > As comment of pci_get_domain_bus_and_slot() says, it returns > a pci device with refcount increment, so when finish using it, > pci_dev_put() needs be called. > > In get_dvsec_vendor0(), in normal path, the returned pci device > is passed

Re: [PATCH] ocxl: fix pci device refcount leak when calling get_function_0()

2022-11-20 Thread Christophe Leroy
Le 19/11/2022 à 15:44, Yang Yingliang a écrit : > As comment of pci_get_domain_bus_and_slot() says, it returns > a pci device with refcount increment, so when finish using it, > pci_dev_put() needs be called. > > In get_dvsec_vendor0(), in normal path, the returned pci device > is passed to

Re: [PATCH] misc: ocxl: fix possible name leak in ocxl_file_register_afu()

2022-11-20 Thread Andrew Donnellan
On Fri, 2022-11-11 at 22:59 +0800, Yang Yingliang wrote: > If device_register() returns error in ocxl_file_register_afu(), > the name allocated by dev_set_name() need be freed. As comment > of device_register() says, it should use put_device() to give > up the reference in the error path. So fix

Re: [PATCH 2/2] cxl: fix possible null-ptr-deref in cxl_pci_init_afu|adapter()

2022-11-20 Thread Andrew Donnellan
On Fri, 2022-11-11 at 22:54 +0800, Yang Yingliang wrote: > If device_register() fails in cxl_pci_afu|adapter(), the device > is not added, device_unregister() can not be called in the error > path, otherwise it will cause a null-ptr-deref because of removing > not added device. > > As comment of

Re: [PATCH 1/2] cxl: fix possible null-ptr-deref in cxl_guest_init_afu|adapter()

2022-11-20 Thread Andrew Donnellan
On Fri, 2022-11-11 at 22:54 +0800, Yang Yingliang wrote: > If device_register() fails in cxl_register_afu|adapter(), the device > is not added, device_unregister() can not be called in the error > path, > otherwise it will cause a null-ptr-deref because of removing not > added > device. > > As

[PATCH linux-next][RFC]torture: avoid offline tick_do_timer_cpu

2022-11-20 Thread Zhouyi Zhou
During CPU-hotplug torture (CONFIG_NO_HZ_FULL=y), if we try to offline tick_do_timer_cpu, the operation will fail because in function tick_nohz_cpu_down: ``` if (tick_nohz_full_running && tick_do_timer_cpu == cpu) return -EBUSY; ``` Above bug was first discovered in torture tests performed

Re: [PATCH 2/4] fs: define a firmware security filesystem named fwsecurityfs

2022-11-20 Thread James Bottomley
On Sun, 2022-11-20 at 17:13 +0100, Greg Kroah-Hartman wrote: > On Sat, Nov 19, 2022 at 01:20:09AM -0500, Nayna wrote: > > > > On 11/17/22 16:27, Greg Kroah-Hartman wrote: > > > On Mon, Nov 14, 2022 at 06:03:43PM -0500, Nayna wrote: > > > > On 11/10/22 04:58, Greg Kroah-Hartman wrote: [...] > > >

[Bug 216715] New: kernel 6.1-rc5 + KASAN_OUTLINE fails to boot at very early stage when DEBUG_PAGEALLOC_ENABLE_DEFAULT is enabled (PowerMac G4 3,6)

2022-11-20 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216715 Bug ID: 216715 Summary: kernel 6.1-rc5 + KASAN_OUTLINE fails to boot at very early stage when DEBUG_PAGEALLOC_ENABLE_DEFAULT is enabled (PowerMac G4 3,6) Product: Platform

[PATCH v5 6/6] powerpc/kexec: add crash memory hotplug support

2022-11-20 Thread Sourabh Jain
Extend PowerPC arch crash hotplug handler to support memory hotplug events. Since elfcorehdr is used to exchange the memory info between the kernels hence it needs to be recreated to reflect the changes due to memory hotplug events. The way memory hotplug events are handled on PowerPC and the

[PATCH v5 5/6] crash: forward memory_notify args to arch crash hotplug handler

2022-11-20 Thread Sourabh Jain
The way memory hot remove is handled on PowerPC, it is hard to update the elfcorehdr without memory_notify args. On PowePC memblock data structure is used to prepare elfcorehdr for kdump. Since the notifier used for memory hotplug crash handler get initiated before the memblock data structure

[PATCH v5 4/6] powerpc/crash: add crash CPU hotplug support

2022-11-20 Thread Sourabh Jain
Introduce powerpc crash hotplug handler to update the necessary kexec segments on CPU/Memory hotplug events. A common crash hotplug handler is triggered from generic infrastructure for both CPU/Memory hot un/plugged events but in this patch, only CPU un/plugged events are introduced. The memory

[PATCH v5 1/6] powerpc/kexec: turn some static helper functions public

2022-11-20 Thread Sourabh Jain
Move update_cpus_node and get_crash_memory_ranges functions from kexec/file_load.c to kexec/core_64.c to make these functions usable by other kexec compoenets. Later in the series, both functions are used for in-kernel updates to kexec segments in the event of CPU/Memory hotplug for both

[PATCH v5 3/6] crash: add phdr for possible CPUs in elfcorehdr

2022-11-20 Thread Sourabh Jain
On architectures like PowerPC the crash notes are available for all possible CPUs. So let's populate the elfcorehdr for all possible CPUs having crash notes to avoid updating elfcorehdr during in-kernel crash update on CPU hotplug events. The similar technique was used in kexec-tool for

[PATCH v5 0/6] In kernel handling of CPU hotplug events for crash kernel

2022-11-20 Thread Sourabh Jain
This patch series implements the crash hotplug handler on PowerPC introduced by https://lkml.org/lkml/2022/10/31/854 patch series. The Problem: Post hotplug/DLPAR events the capture kernel holds stale information about the system. Dump collection with stale capture kernel might end

[PATCH v5 2/6] powerpc/crash: update kimage_arch struct

2022-11-20 Thread Sourabh Jain
Add a new member "fdt_index" to kimage_arch struct to hold the index of the FDT (Flattened Device Tree) segment in the kexec segment array. Having direct access to FDT segment will help arch crash hotplug handler to avoid looping kexec segment array to identify the FDT segment index for every FDT

Re: [PATCH 000/606] i2c: Complete conversion to i2c_probe_new

2022-11-20 Thread Sebastian Reichel
Hi, On Fri, Nov 18, 2022 at 11:35:34PM +0100, Uwe Kleine-König wrote: > Hello, > > since commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new() > call-back type") from 2016 there is a "temporary" alternative probe > callback for i2c drivers. > > This series completes all drivers to this

[Bug 216713] BUG: Bad page map in process init pte:c0ab684c pmd:01182000 (on a PowerMac G4 DP)

2022-11-20 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216713 --- Comment #1 from Erhard F. (erhar...@mailbox.org) --- Created attachment 303244 --> https://bugzilla.kernel.org/attachment.cgi?id=303244=edit kernel .config (6.0.9, PowerMac G4 DP) -- You may reply to this email to add a comment. You are

[Bug 216713] New: BUG: Bad page map in process init pte:c0ab684c pmd:01182000 (on a PowerMac G4 DP)

2022-11-20 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216713 Bug ID: 216713 Summary: BUG: Bad page map in process init pte:c0ab684c pmd:01182000 (on a PowerMac G4 DP) Product: Platform Specific/Hardware Version: 2.5 Kernel Version: 6.0.9

[Bug 216407] OF: unittest fails some tests on ppc and ppc64 (### dt-test ### end of unittest - 266 passed, 6 failed)

2022-11-20 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216407 Erhard F. (erhar...@mailbox.org) changed: What|Removed |Added Attachment #301646|0 |1 is obsolete|

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-6.1-5 tag

2022-11-20 Thread pr-tracker-bot
The pull request you sent on Sun, 20 Nov 2022 12:34:18 +1100: > https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git > tags/powerpc-6.1-5 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/712fb83dc3f688458ae91bb0a5c706b239ab4684 Thank you! --

Re: build failure in linux-next: offb missing fb helpers

2022-11-20 Thread Thomas Zimmermann
Hi Am 19.11.22 um 19:15 schrieb Randy Dunlap: Hi, On 11/19/22 07:37, Michal Suchánek wrote: Hello, On Sat, Nov 19, 2022 at 10:27:04PM +0900, Masahiro Yamada wrote: On Sat, Nov 19, 2022 at 3:20 PM Randy Dunlap wrote: Hi-- [adding Masahiro-san] On 11/18/22 07:03, Michal Suchánek wrote:

[Bug 206203] kmemleak reports various leaks in drivers/of/unittest.c

2022-11-20 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206203 --- Comment #25 from Erhard F. (erhar...@mailbox.org) --- Created attachment 303241 --> https://bugzilla.kernel.org/attachment.cgi?id=303241=edit kernel .config (kernel 6.1-rc5, PowerMac G4 3,6) -- You may reply to this email to add a

[Bug 206203] kmemleak reports various leaks in drivers/of/unittest.c

2022-11-20 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206203 --- Comment #24 from Erhard F. (erhar...@mailbox.org) --- Created attachment 303240 --> https://bugzilla.kernel.org/attachment.cgi?id=303240=edit kmemleak output (kernel 6.1-rc5, PowerMac G4 3,6) -- You may reply to this email to add a

[Bug 206203] kmemleak reports various leaks in drivers/of/unittest.c

2022-11-20 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206203 Erhard F. (erhar...@mailbox.org) changed: What|Removed |Added Attachment #289679|0 |1 is obsolete|

[Bug 206203] kmemleak reports various leaks in drivers/of/unittest.c

2022-11-20 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206203 Erhard F. (erhar...@mailbox.org) changed: What|Removed |Added Status|RESOLVED|REOPENED

Re: [PATCH 2/4] fs: define a firmware security filesystem named fwsecurityfs

2022-11-20 Thread Greg Kroah-Hartman
On Sat, Nov 19, 2022 at 01:20:09AM -0500, Nayna wrote: > > On 11/17/22 16:27, Greg Kroah-Hartman wrote: > > On Mon, Nov 14, 2022 at 06:03:43PM -0500, Nayna wrote: > > > On 11/10/22 04:58, Greg Kroah-Hartman wrote: > > > > On Wed, Nov 09, 2022 at 03:10:37PM -0500, Nayna wrote: > > > > > On 11/9/22

Re: [PATCH v4 01/11] dt-bindings: wiiu: Document the Nintendo Wii U devicetree

2022-11-20 Thread Rob Herring
On Sat, Nov 19, 2022 at 10:30:31PM +1100, Ash Logan wrote: > Adds schema for the various Wii U devicetree nodes used. > > Signed-off-by: Ash Logan > --- > v3->v4: Rework to match expected style and conciceness. > > .../bindings/powerpc/nintendo/wiiu.yaml | 25 + >

[6.1.0-rc5-next-20221118] Kernel crash (alloc_buddy_hugetlb_folio) - THP tests

2022-11-20 Thread Sachin Sant
While running transparent hugepage defragmentation test [1] on Power10 server following crash was seen [11725.379229] Kernel attempted to read user page (8) - exploit attempt? (uid: 0) [11725.379251] BUG: Kernel NULL pointer dereference on read at 0x0008 [11725.379257] Faulting instruction