[PATCH] ASoC: fsl: Fix refcount leak in imx_sgtl5000_probe

2022-05-10 Thread Miaoqian Lin
of_find_i2c_device_by_node() takes a reference, In error paths, we should call put_device() to drop the reference to aviod refount leak. Fixes: 81e8e4926167 ("ASoC: fsl: add sgtl5000 clock support for imx-sgtl5000") Signed-off-by: Miaoqian Lin --- sound/soc/fsl/imx-sgtl5000.c | 14 --

[PATCH] ASoC: imx-hdmi: Fix refcount leak in imx_hdmi_probe

2022-05-10 Thread Miaoqian Lin
of_find_device_by_node() takes reference, we should use put_device() to release it. when devm_kzalloc() fails, it doesn't have a put_device(), it will cause refcount leak. Add missing put_device() to fix this. Fixes: 6a5f850aa83a ("ASoC: fsl: Add imx-hdmi machine driver") Fixes: f670b274f7f6 ("ASo

Re: [PATCH v3 2/3] mm: rmap: Fix CONT-PTE/PMD size hugetlb issue when migration

2022-05-10 Thread Baolin Wang
On 5/11/2022 7:28 AM, Andrew Morton wrote: On Tue, 10 May 2022 16:17:39 -0700 Andrew Morton wrote: + +static inline pte_t huge_ptep_clear_flush(struct vm_area_struct *vma, + unsigned long addr, pte_t *ptep) +{ + return ptep_get(ptep); +} + +sta

Re: [PATCH v3 2/3] mm: rmap: Fix CONT-PTE/PMD size hugetlb issue when migration

2022-05-10 Thread Andrew Morton
applied to the wrong git tree, kindly drop us a note. > And when submitting patch, we suggest to use '--base' as documented in > https://git-scm.com/docs/git-format-patch] > > url: > https://github.com/intel-lab-lkp/linux/commits/Baolin-Wang/Fix-CONT-PTE-PMD-size-huge

[PATCH V2] powerpc/eeh: Drop redundant spinlock initialization

2022-05-10 Thread Haowen Bai
slot_errbuf_lock has declared and initialized by DEFINE_SPINLOCK, so we don't need to spin_lock_init again, drop it. Signed-off-by: Haowen Bai --- V1->V2: update comment arch/powerpc/platforms/pseries/eeh_pseries.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/power

Re: [PATCH kernel] KVM: PPC: Book3s: Remove real mode interrupt controller hcalls handlers

2022-05-10 Thread Alexey Kardashevskiy
On 5/11/22 03:58, Cédric Le Goater wrote: Hello Alexey, On 5/9/22 09:11, Alexey Kardashevskiy wrote: Currently we have 2 sets of interrupt controller hypercalls handlers for real and virtual modes, this is from POWER8 times when switching MMU on was considered an expensive operation. POWER9

Re: [PATCH v3 2/3] mm: rmap: Fix CONT-PTE/PMD size hugetlb issue when migration

2022-05-10 Thread kernel test robot
use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/intel-lab-lkp/linux/commits/Baolin-Wang/Fix-CONT-PTE-PMD-size-hugetlb-issue-when-unmapping-or-migrating/20220510-114753 base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/

Re: [PATCH v3 2/3] mm: rmap: Fix CONT-PTE/PMD size hugetlb issue when migration

2022-05-10 Thread Andrew Morton
On Tue, 10 May 2022 16:17:39 -0700 Andrew Morton wrote: > > + > > +static inline pte_t huge_ptep_clear_flush(struct vm_area_struct *vma, > > + unsigned long addr, pte_t *ptep) > > +{ > > + return ptep_get(ptep); > > +} > > + > > +static inline void set_huge_

Re: [PATCH v3 2/3] mm: rmap: Fix CONT-PTE/PMD size hugetlb issue when migration

2022-05-10 Thread Andrew Morton
On Tue, 10 May 2022 11:45:59 +0800 Baolin Wang wrote: > On some architectures (like ARM64), it can support CONT-PTE/PMD size > hugetlb, which means it can support not only PMD/PUD size hugetlb: > 2M and 1G, but also CONT-PTE/PMD size: 64K and 32M if a 4K page > size specified. > > When migratin

Re: [PATCH kernel] KVM: PPC: Book3s: Remove real mode interrupt controller hcalls handlers

2022-05-10 Thread Cédric Le Goater
Hello Alexey, On 5/9/22 09:11, Alexey Kardashevskiy wrote: Currently we have 2 sets of interrupt controller hypercalls handlers for real and virtual modes, this is from POWER8 times when switching MMU on was considered an expensive operation. POWER9 however does not have dependent threads and M

Re: [PATCH 04/30] firmware: google: Convert regular spinlock into trylock on panic path

2022-05-10 Thread John Ogness
On 2022-05-10, Steven Rostedt wrote: >> As already mentioned in the other reply, panic() sometimes stops the >> other CPUs using NMI, for example, see kdump_nmi_shootdown_cpus(). >> >> Another situation is when the CPU using the lock ends in some >> infinite loop because something went wrong. The

Re: [PATCH 18/30] notifier: Show function names on notifier routines if DEBUG_NOTIFIERS is set

2022-05-10 Thread Steven Rostedt
On Thu, 28 Apr 2022 09:01:13 +0800 Xiaoming Ni wrote: > > +#ifdef CONFIG_DEBUG_NOTIFIERS > > + { > > + char sym_name[KSYM_NAME_LEN]; > > + > > + pr_info("notifiers: registered %s()\n", > > + notifier_name(n, sym_name)); > > + } > > Duplicate Code. > >

Re: [PATCH 04/30] firmware: google: Convert regular spinlock into trylock on panic path

2022-05-10 Thread Steven Rostedt
On Tue, 10 May 2022 13:38:39 +0200 Petr Mladek wrote: > As already mentioned in the other reply, panic() sometimes stops > the other CPUs using NMI, for example, see kdump_nmi_shootdown_cpus(). > > Another situation is when the CPU using the lock ends in some > infinite loop because something we

Re: [PATCH 08/30] powerpc/setup: Refactor/untangle panic notifiers

2022-05-10 Thread Guilherme G. Piccoli
On 10/05/2022 10:53, Michael Ellerman wrote: > "Guilherme G. Piccoli" writes: >> On 05/05/2022 15:55, Hari Bathini wrote: >>> [...] >>> The change looks good. I have tested it on an LPAR (ppc64). >>> >>> Reviewed-by: Hari Bathini >>> >> >> Hi Michael. do you think it's possible to add this one t

Re: [PATCH 08/30] powerpc/setup: Refactor/untangle panic notifiers

2022-05-10 Thread Michael Ellerman
"Guilherme G. Piccoli" writes: > On 05/05/2022 15:55, Hari Bathini wrote: >> [...] >> The change looks good. I have tested it on an LPAR (ppc64). >> >> Reviewed-by: Hari Bathini >> > > Hi Michael. do you think it's possible to add this one to powerpc/next > (or something like that), or do you

Re: [PATCH 04/30] firmware: google: Convert regular spinlock into trylock on panic path

2022-05-10 Thread Guilherme G. Piccoli
On 10/05/2022 08:38, Petr Mladek wrote: > [...] > I see two more alternative solutions: > > 1st variant is a trick already used in console write() callbacks. > They do trylock() when oops_in_progress is set. They remember > the result to prevent double unlock when printing Oops messages and > the

Re: [PATCH 05/30] misc/pvpanic: Convert regular spinlock into trylock on panic path

2022-05-10 Thread Guilherme G. Piccoli
On 10/05/2022 09:14, Petr Mladek wrote: > [...] >> With that said, it's dangerous to use regular spinlocks in such path, >> as introduced by commit b3c0f8774668 ("misc/pvpanic: probe multiple >> instances"). >> This patch fixes that by replacing regular spinlocks with the trylock >> safer approach

Re: [PATCH 01/30] x86/crash,reboot: Avoid re-disabling VMX in all CPUs on crash/restart

2022-05-10 Thread Guilherme G. Piccoli
On 09/05/2022 12:52, Sean Christopherson wrote: > I find the shortlog to be very confusing, the bug has nothing to do with > disabling > VMX and I distinctly remember wrapping VMXOFF with exception fixup to prevent > doom > if VMX is already disabled :-). The issue is really that > nmi_shootdow

Re: [PATCH] powerpc/eeh: Drop redundant spinlock initialization

2022-05-10 Thread Tyrel Datwyler
On 5/10/22 02:53, Haowen Bai wrote: > slot_errbuf_lock has declared and initialized by DEFINE_SPINLOCK, > so we don't need to spin_lock_init again, drop it. > > Signed-off-by: Haowen Bai > --- > arch/powerpc/platforms/pseries/eeh_pseries.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a

Re: [PATCH 23/30] printk: kmsg_dump: Introduce helper to inform number of dumpers

2022-05-10 Thread Steven Rostedt
On Wed, 27 Apr 2022 19:49:17 -0300 "Guilherme G. Piccoli" wrote: > Currently we don't have a way to check if there are dumpers set, > except counting the list members maybe. This patch introduces a very > simple helper to provide this information, by just keeping track of > registered/unregistere

Re: [PATCH V2 1/2] tools/perf: Add utility function to read /proc/cpuinfo for any field

2022-05-10 Thread Arnaldo Carvalho de Melo
Em Tue, May 10, 2022 at 07:08:47PM +0530, Athira Rajeev escreveu: > > > > On 06-May-2022, at 3:03 PM, Athira Rajeev > > wrote: > > > > > > > >> On 05-May-2022, at 10:54 PM, Arnaldo Carvalho de Melo > >> wrote: > >> > >> Em Thu, May 05, 2022 at 03:09:59PM +0530, Athira Rajeev escreveu: > >

Re: [PATCH] tools/perf/tests: Skip perf BPF test if clang is not present

2022-05-10 Thread Arnaldo Carvalho de Melo
Em Fri, May 06, 2022 at 03:07:51PM +0530, Athira Rajeev escreveu: > > > > On 05-May-2022, at 10:51 PM, Arnaldo Carvalho de Melo > > wrote: > > > > Em Thu, May 05, 2022 at 03:30:39PM +0530, Athira Rajeev escreveu: > >> Perf BPF filter test fails in environment where "clang" > >> is not installe

Re: [PATCH] PCI/AER: Iterate over error counters instead of error strings

2022-05-10 Thread Bjorn Helgaas
[+cc Rajat] On Mon, May 09, 2022 at 06:14:41PM +, Mohamed Khalfella wrote: > PCI AER stats counters sysfs attributes need to iterate over > stats counters instead of stats names. Thanks for catching this; it definitely looks like a real issue! I guess you're probably seeing junk in the sysf

Re: [PATCH 2/2] powerpc/vdso: Link with ld.lld when requested

2022-05-10 Thread Nathan Chancellor
On Tue, May 10, 2022 at 04:22:12PM +1000, Alexey Kardashevskiy wrote: > > > On 5/10/22 06:46, Nathan Chancellor wrote: > > The PowerPC vDSO is linked with $(CC) instead of $(LD), which means the > > default linker of the compiler is used instead of the linker requested > > by the builder. > > >

Re: [PATCH -next] powerpc: add support for syscall stack randomization

2022-05-10 Thread Kees Cook
On Tue, May 10, 2022 at 07:23:46PM +1000, Nicholas Piggin wrote: > Excerpts from Xiu Jianfeng's message of May 5, 2022 9:19 pm: > > Add support for adding a random offset to the stack while handling > > syscalls. This patch uses mftb() instead of get_random_int() for better > > performance. > > He

Re: [PATCH 14/30] panic: Properly identify the panic event to the notifiers' callbacks

2022-05-10 Thread Guilherme G. Piccoli
On 10/05/2022 12:16, Petr Mladek wrote: > [...] > Hmm, this looks like a hack. PANIC_UNUSED will never be used. > All notifiers will be always called with PANIC_NOTIFIER. > > The @val parameter is normally used when the same notifier_list > is used in different situations. > > But you are going t

Re: [PATCH v4 10/14] kbuild: check static EXPORT_SYMBOL* by script instead of modpost

2022-05-10 Thread Masahiro Yamada
On Tue, May 10, 2022 at 3:05 AM 'Nick Desaulniers' via Clang Built Linux wrote: > > On Sun, May 8, 2022 at 12:10 PM Masahiro Yamada wrote: > > > > diff --git a/scripts/check-local-export b/scripts/check-local-export > > new file mode 100755 > > index ..d1721fa63057 > > --- /dev/null >

Re: [PATCH] tools/perf/tests: Skip perf BPF test if clang is not present

2022-05-10 Thread Athira Rajeev
> On 06-May-2022, at 3:07 PM, Athira Rajeev wrote: > > > >> On 05-May-2022, at 10:51 PM, Arnaldo Carvalho de Melo >> wrote: >> >> Em Thu, May 05, 2022 at 03:30:39PM +0530, Athira Rajeev escreveu: >>> Perf BPF filter test fails in environment where "clang" >>> is not installed. >>> >>> Te

Re: [PATCH V2 1/2] tools/perf: Add utility function to read /proc/cpuinfo for any field

2022-05-10 Thread Athira Rajeev
> On 06-May-2022, at 3:03 PM, Athira Rajeev wrote: > > > >> On 05-May-2022, at 10:54 PM, Arnaldo Carvalho de Melo >> wrote: >> >> Em Thu, May 05, 2022 at 03:09:59PM +0530, Athira Rajeev escreveu: >>> /proc/cpuinfo provides information about type of processor, number >>> of CPU's etc. Read

Re: [PATCH v4 06/14] kbuild: link symbol CRCs at final link, removing CONFIG_MODULE_REL_CRCS

2022-05-10 Thread Masahiro Yamada
On Tue, May 10, 2022 at 2:51 AM Nick Desaulniers wrote: > > On Sun, May 8, 2022 at 12:10 PM Masahiro Yamada wrote: > > > > diff --git a/include/asm-generic/export.h b/include/asm-generic/export.h > > index 07a36a874dca..51ce72ce80fa 100644 > > --- a/include/asm-generic/export.h > > +++ b/include

Re: [PATCH v6 29/29] x86/tsc: Switch to perf-based hardlockup detector if TSC become unstable

2022-05-10 Thread Nicholas Piggin
Excerpts from Ricardo Neri's message of May 6, 2022 10:00 am: > The HPET-based hardlockup detector relies on the TSC to determine if an > observed NMI interrupt was originated by HPET timer. Hence, this detector > can no longer be used with an unstable TSC. > > In such case, permanently stop the H

[linux-next] [FC/EXT4] [PPC] WARNING: CPU: 33 PID: 47869 at block/blk-lib.c:50 __blkdev_issue_discard+0x250/0x280

2022-05-10 Thread Tasmiya Nalatwad
Greetings, linux-next kernel 5.18.0-rc5-next-20220506 WARN_ON is triggered while running stress test on FC disk created with the EXT4 filesystem. Console Logs : md127: detected capacity change from 0 to 62879744 EXT4-fs (dm-11): mounted filesystem with ordered data mode. Quota mode: none.

Re: [PATCH v6 28/29] x86/tsc: Restart NMI watchdog after refining tsc_khz

2022-05-10 Thread Thomas Gleixner
On Tue, May 10 2022 at 21:16, Nicholas Piggin wrote: > Excerpts from Ricardo Neri's message of May 6, 2022 10:00 am: >> +/* >> + * If in use, the HPET hardlockup detector relies on tsc_khz. >> + * Reconfigure it to make use of the refined tsc_khz. >> + */ >> +lockup_detector_rec

Re: [PATCH v6 00/23] Rust support

2022-05-10 Thread Miguel Ojeda
Hi David, On Tue, May 10, 2022 at 6:45 AM David Gow wrote: > > I've just sent out a pull request to get this working under UML as > well, which would simplify running these further: > https://github.com/Rust-for-Linux/linux/pull/766 Thanks a lot! > Yeah, these are all fair points: particularly

Re: [PATCH v2] KVM: PPC: Book3S PR: Enable MSR_DR for switch_mmu_context()

2022-05-10 Thread Christophe Leroy
Le 10/05/2022 à 13:18, Alexander Graf a écrit : > Commit 863771a28e27 ("powerpc/32s: Convert switch_mmu_context() to C") > moved the switch_mmu_context() to C. While in principle a good idea, it > meant that the function now uses the stack. The stack is not accessible > from real mode though. >

Re: [PATCH v6 28/29] x86/tsc: Restart NMI watchdog after refining tsc_khz

2022-05-10 Thread Nicholas Piggin
Excerpts from Ricardo Neri's message of May 6, 2022 10:00 am: > The HPET hardlockup detector relies on tsc_khz to estimate the value of > that the TSC will have when its HPET channel fires. A refined tsc_khz > helps to estimate better the expected TSC value. > > Using the early value of tsc_khz ma

Re: [PATCH] powerpc/perf: Add support for caps under sysfs in powerpc

2022-05-10 Thread Athira Rajeev
> On 06-May-2022, at 6:55 PM, Michael Ellerman wrote: > > Hi Athira, > > Some comments below :) > > Athira Rajeev writes: >> Add caps support under "/sys/bus/event_source/devices//" >> for powerpc. This directory can be used to expose some of the >> specific features that powerpc PMU suppor

Re: [PATCH v6 24/29] watchdog/hardlockup: Use parse_option_str() to handle "nmi_watchdog"

2022-05-10 Thread Nicholas Piggin
Excerpts from Ricardo Neri's message of May 6, 2022 10:00 am: > Prepare hardlockup_panic_setup() to handle a comma-separated list of > options. Thus, it can continue parsing its own command-line options while > ignoring parameters that are relevant only to specific implementations of > the hardlock

Re: [PATCH v6 20/29] init/main: Delay initialization of the lockup detector after smp_init()

2022-05-10 Thread Nicholas Piggin
Excerpts from Ricardo Neri's message of May 6, 2022 9:59 am: > Certain implementations of the hardlockup detector require support for > Inter-Processor Interrupt shorthands. On x86, support for these can only > be determined after all the possible CPUs have booted once (in > smp_init()). Other arch

Re: [PATCH] bug: Use normal relative pointers in 'struct bug_entry'

2022-05-10 Thread Catalin Marinas
On Thu, May 05, 2022 at 06:09:45PM -0700, Josh Poimboeuf wrote: > With CONFIG_GENERIC_BUG_RELATIVE_POINTERS, the addr/file relative > pointers are calculated weirdly: based on the beginning of the bug_entry > struct address, rather than their respective pointer addresses. > > Make the relative poi

Re: [PATCH] KVM: PPC: Book3S PR: Enable MSR_DR for switch_mmu_context()

2022-05-10 Thread Matt Evans
Hi Alex, > On 9 May 2022, at 21:23, Alexander Graf wrote: > > Commit 863771a28e27 ("powerpc/32s: Convert switch_mmu_context() to C") > moved the switch_mmu_context() to C. While in principle a good idea, it > meant that the function now uses the stack. The stack is not accessible > from real mod

[PATCH] powerpc/eeh: Drop redundant spinlock initialization

2022-05-10 Thread Haowen Bai
slot_errbuf_lock has declared and initialized by DEFINE_SPINLOCK, so we don't need to spin_lock_init again, drop it. Signed-off-by: Haowen Bai --- arch/powerpc/platforms/pseries/eeh_pseries.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc/platforms/pseries/eeh_pseries.c b/arch/

Re: [PATCH -next] powerpc: add support for syscall stack randomization

2022-05-10 Thread Nicholas Piggin
Excerpts from Xiu Jianfeng's message of May 5, 2022 9:19 pm: > Add support for adding a random offset to the stack while handling > syscalls. This patch uses mftb() instead of get_random_int() for better > performance. Hey, very nice. > > Signed-off-by: Xiu Jianfeng > --- > arch/powerpc/Kconfi

Re: [PATCH] powerpc/crash: save cpu register data in crash_smp_send_stop()

2022-05-10 Thread Nicholas Piggin
Excerpts from Hari Bathini's message of May 7, 2022 2:39 am: > Capture register data for secondary CPUs in crash_smp_send_stop() > instead of doing it much later in crash_kexec_prepare_cpus() function > with another set of NMI IPIs to secondary CPUs. This change avoids > unnecessarily tricky post p