Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ftrace.c #171

Closed
wants to merge 1 commit into from
Closed

Update ftrace.c #171

wants to merge 1 commit into from

Conversation

dautovri
Copy link

spelling mistake

spelling mistake
@dautovri dautovri closed this Mar 16, 2015
@fdev1
Copy link

fdev1 commented Mar 16, 2015

Next time you may want to check your dictionary. :)

@dautovri
Copy link
Author

I'm sorry.

0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Nov 11, 2015
…patch-fixes

ERROR: code indent should use tabs where possible
torvalds#171: FILE: mm/page_idle.c:75:
+                if (!pmd_present(*pmd))$

WARNING: please, no spaces at the start of a line
torvalds#171: FILE: mm/page_idle.c:75:
+                if (!pmd_present(*pmd))$

WARNING: Missing a blank line after declarations
torvalds#194: FILE: mm/page_idle.c:93:
+		pmd_t pmde = *pmd;
+		barrier();

WARNING: Missing a blank line after declarations
torvalds#304: FILE: mm/rmap.c:867:
+		pmd_t pmde = *pmd;
+		barrier();

total: 1 errors, 3 warnings, 327 lines checked

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-prepare-page_referenced-and-page_idle-to-new-thp-refcounting.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Nov 12, 2015
…patch-fixes

ERROR: code indent should use tabs where possible
torvalds#171: FILE: mm/page_idle.c:75:
+                if (!pmd_present(*pmd))$

WARNING: please, no spaces at the start of a line
torvalds#171: FILE: mm/page_idle.c:75:
+                if (!pmd_present(*pmd))$

WARNING: Missing a blank line after declarations
torvalds#194: FILE: mm/page_idle.c:93:
+		pmd_t pmde = *pmd;
+		barrier();

WARNING: Missing a blank line after declarations
torvalds#304: FILE: mm/rmap.c:867:
+		pmd_t pmde = *pmd;
+		barrier();

total: 1 errors, 3 warnings, 327 lines checked

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-prepare-page_referenced-and-page_idle-to-new-thp-refcounting.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Nov 19, 2015
…patch-fixes

ERROR: code indent should use tabs where possible
torvalds#171: FILE: mm/page_idle.c:75:
+                if (!pmd_present(*pmd))$

WARNING: please, no spaces at the start of a line
torvalds#171: FILE: mm/page_idle.c:75:
+                if (!pmd_present(*pmd))$

WARNING: Missing a blank line after declarations
torvalds#194: FILE: mm/page_idle.c:93:
+		pmd_t pmde = *pmd;
+		barrier();

WARNING: Missing a blank line after declarations
torvalds#304: FILE: mm/rmap.c:867:
+		pmd_t pmde = *pmd;
+		barrier();

total: 1 errors, 3 warnings, 327 lines checked

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-prepare-page_referenced-and-page_idle-to-new-thp-refcounting.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Nov 24, 2015
If common clock framework is configured, the driver generates a warning,
which is fixed by this change:

    WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:727 clk_core_enable+0x2c/0xa4()
    Modules linked in:
    CPU: 0 PID: 1 Comm: swapper Tainted: G        W       4.3.0-rc2+ torvalds#171
    Hardware name: LPC32XX SoC (Flattened Device Tree)
    Backtrace:
    [<>] (dump_backtrace) from [<>] (show_stack+0x18/0x1c)
    [<>] (show_stack) from [<>] (dump_stack+0x20/0x28)
    [<>] (dump_stack) from [<>] (warn_slowpath_common+0x90/0xb8)
    [<>] (warn_slowpath_common) from [<>] (warn_slowpath_null+0x24/0x2c)
    [<>] (warn_slowpath_null) from [<>] (clk_core_enable+0x2c/0xa4)
    [<>] (clk_core_enable) from [<>] (clk_enable+0x24/0x38)
    [<>] (clk_enable) from [<>] (pnx4008_wdt_probe+0x78/0x11c)
    [<>] (pnx4008_wdt_probe) from [<>] (platform_drv_probe+0x50/0xa0)
    [<>] (platform_drv_probe) from [<>] (driver_probe_device+0x18c/0x408)
    [<>] (driver_probe_device) from [<>] (__driver_attach+0x70/0x94)
    [<>] (__driver_attach) from [<>] (bus_for_each_dev+0x74/0x98)
    [<>] (bus_for_each_dev) from [<>] (driver_attach+0x20/0x28)
    [<>] (driver_attach) from [<>] (bus_add_driver+0x11c/0x248)
    [<>] (bus_add_driver) from [<>] (driver_register+0xa4/0xe8)
    [<>] (driver_register) from [<>] (__platform_driver_register+0x50/0x64)
    [<>] (__platform_driver_register) from [<>] (platform_wdt_driver_init+0x18/0x20)
    [<>] (platform_wdt_driver_init) from [<>] (do_one_initcall+0x11c/0x1dc)
    [<>] (do_one_initcall) from [<>] (kernel_init_freeable+0x10c/0x1d4)
    [<>] (kernel_init_freeable) from [<>] (kernel_init+0x10/0xec)
    [<>] (kernel_init) from [<>] (ret_from_fork+0x14/0x24)

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Nov 26, 2015
…patch-fixes

ERROR: code indent should use tabs where possible
torvalds#171: FILE: mm/page_idle.c:75:
+                if (!pmd_present(*pmd))$

WARNING: please, no spaces at the start of a line
torvalds#171: FILE: mm/page_idle.c:75:
+                if (!pmd_present(*pmd))$

WARNING: Missing a blank line after declarations
torvalds#194: FILE: mm/page_idle.c:93:
+		pmd_t pmde = *pmd;
+		barrier();

WARNING: Missing a blank line after declarations
torvalds#304: FILE: mm/rmap.c:867:
+		pmd_t pmde = *pmd;
+		barrier();

total: 1 errors, 3 warnings, 327 lines checked

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-prepare-page_referenced-and-page_idle-to-new-thp-refcounting.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Nov 28, 2015
Hi Linus,

Please pull from 'master' branch of
	git://www.linux-watchdog.org/linux-watchdog.git

It contains:
* a null pointer dereference fix for omap_wdt
* some clock related fixes for pnx4008
* an underflow fix in wdt_set_timeout() for w83977f_wdt
* restart fix for tegra wdt
* Kconfig change to support Freescale Layerscape platforms
* Fix for stopping the mtk_wdt watchdog

This will update the following files:

 Kconfig       |    2 +-
 mtk_wdt.c     |    1 +
 omap_wdt.c    |    2 +-
 pnx4008_wdt.c |    8 ++++----
 tegra_wdt.c   |    4 +++-
 w83977f_wdt.c |    2 +-
 6 files changed, 11 insertions(+), 8 deletions(-)

with these Changes:

commit 5da2bf1
Author: Nicolas Boichat <drinkcat@chromium.org>
Date:   Wed Nov 18 10:45:01 2015 +0800

    watchdog: mtk_wdt: Use MODE_KEY when stopping the watchdog

    WDT_MODE value need to be or-ed with MODE_KEY when setting
    watchdog mode. Add it to mtk_wdt_stop function, so that the
    watchdog can be stopped (e.g. during suspend).

    Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
    Acked-by: Matthias Brugger <matthias.bgg@gmail.com>
    Reviewed-by: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

commit 646251a
Author: Shaohui Xie <Shaohui.Xie@freescale.com>
Date:   Tue Nov 17 17:53:19 2015 +0800

    watchdog: Add support for Freescale Layerscape platforms

    Modify watchdog/Kconfig file to support Layerscape platforms.

    Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
    Signed-off-by: Hou Zhiqiang <B48286@freescale.com>
    Acked-by: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

commit 0879eee
Author: Andrew Chew <achew@nvidia.com>
Date:   Mon Nov 9 16:11:38 2015 -0800

    watchdog: tegra: Stop watchdog first if restarting

    If we need to restart the watchdog due to someone changing the timeout
    interval, stop the watchdog before restarting it.  Otherwise, the new
    timeout doesn't seem to take.

    Signed-off-by: Andrew Chew <achew@nvidia.com>
    Reviewed-by: Thierry Reding <treding@nvidia.com>
    Reviewed-by: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

commit 62ed853
Author: Dan Carpenter <dan.carpenter@oracle.com>
Date:   Fri Nov 6 12:56:31 2015 +0300

    watchdog: w83977f_wdt: underflow in wdt_set_timeout()

    "t" is controlled by the user.  If "t" is a very large integer then it
    could lead to a negative "tmrval".  We cap the upper bound of "tmrval"
    but, in the current code, we allow negatives.  This is a bug and it
    causes a static checker warning.  Let's make "tmrval" unsigned to avoid
    this problem.

    Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
    Reviewed-by: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

commit 4c30737
Author: Vladimir Zapolskiy <vz@mleia.com>
Date:   Wed Oct 28 02:55:35 2015 +0200

    watchdog: pnx4008: make global wdt_clk static

    Silences sparse warning:

      drivers/watchdog/pnx4008_wdt.c:83:25:
        warning: symbol 'wdt_clk' was not declared. Should it be static?

    Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
    Reviewed-by: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

commit b647d42
Author: Vladimir Zapolskiy <vz@mleia.com>
Date:   Sat Oct 17 21:28:16 2015 +0300

    watchdog: pnx4008: fix warnings caused by enabling unprepared clock

    If common clock framework is configured, the driver generates a warning,
    which is fixed by this change:

        WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:727 clk_core_enable+0x2c/0xa4()
        Modules linked in:
        CPU: 0 PID: 1 Comm: swapper Tainted: G        W       4.3.0-rc2+ torvalds#171
        Hardware name: LPC32XX SoC (Flattened Device Tree)
        Backtrace:
        [<>] (dump_backtrace) from [<>] (show_stack+0x18/0x1c)
        [<>] (show_stack) from [<>] (dump_stack+0x20/0x28)
        [<>] (dump_stack) from [<>] (warn_slowpath_common+0x90/0xb8)
        [<>] (warn_slowpath_common) from [<>] (warn_slowpath_null+0x24/0x2c)
        [<>] (warn_slowpath_null) from [<>] (clk_core_enable+0x2c/0xa4)
        [<>] (clk_core_enable) from [<>] (clk_enable+0x24/0x38)
        [<>] (clk_enable) from [<>] (pnx4008_wdt_probe+0x78/0x11c)
        [<>] (pnx4008_wdt_probe) from [<>] (platform_drv_probe+0x50/0xa0)
        [<>] (platform_drv_probe) from [<>] (driver_probe_device+0x18c/0x408)
        [<>] (driver_probe_device) from [<>] (__driver_attach+0x70/0x94)
        [<>] (__driver_attach) from [<>] (bus_for_each_dev+0x74/0x98)
        [<>] (bus_for_each_dev) from [<>] (driver_attach+0x20/0x28)
        [<>] (driver_attach) from [<>] (bus_add_driver+0x11c/0x248)
        [<>] (bus_add_driver) from [<>] (driver_register+0xa4/0xe8)
        [<>] (driver_register) from [<>] (__platform_driver_register+0x50/0x64)
        [<>] (__platform_driver_register) from [<>] (platform_wdt_driver_init+0x18/0x20)
        [<>] (platform_wdt_driver_init) from [<>] (do_one_initcall+0x11c/0x1dc)
        [<>] (do_one_initcall) from [<>] (kernel_init_freeable+0x10c/0x1d4)
        [<>] (kernel_init_freeable) from [<>] (kernel_init+0x10/0xec)
        [<>] (kernel_init) from [<>] (ret_from_fork+0x14/0x24)

    Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
    Reviewed-by: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

commit de55acd
Author: Peter Robinson <pbrobinson@gmail.com>
Date:   Mon Nov 2 02:20:20 2015 +0000

    watchdog: omap_wdt: fix null pointer dereference

    Fix issue from two patches overlapping causing a kernel oops

    [ 3569.297449] Unable to handle kernel NULL pointer dereference at virtual address 00000088
    [ 3569.306272] pgd = dc894000
    [ 3569.309287] [00000088] *pgd=00000000
    [ 3569.313104] Internal error: Oops: 5 [#1] SMP ARM
    [ 3569.317986] Modules linked in: ip6t_rpfilter ip6t_REJECT nf_reject_ipv6 xt_conntrack ebtable_filter ebtable_nat ebtable_broute bridge stp llc ebtables ip6table_security ip6table_raw ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_filter ip6_tables iptable_security iptable_raw iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle musb_dsps cppi41 musb_hdrc phy_am335x udc_core phy_generic phy_am335x_control omap_sham omap_aes omap_rng omap_hwspinlock omap_mailbox hwspinlock_core musb_am335x omap_wdt at24 8250_omap leds_gpio cpufreq_dt smsc davinci_mdio mmc_block ti_cpsw cpsw_common ptp pps_core cpsw_ale davinci_cpdma omap_hsmmc omap_dma mmc_core i2c_dev
    [ 3569.386293] CPU: 0 PID: 1429 Comm: wdctl Not tainted 4.3.0-0.rc7.git0.1.fc24.armv7hl #1
    [ 3569.394740] Hardware name: Generic AM33XX (Flattened Device Tree)
    [ 3569.401179] task: dbd11a00 ti: dbaac000 task.ti: dbaac000
    [ 3569.406917] PC is at omap_wdt_get_timeleft+0xc/0x20 [omap_wdt]
    [ 3569.413106] LR is at watchdog_ioctl+0x3cc/0x42c
    [ 3569.417902] pc : [<bf0ab138>]    lr : [<c0739c54>]    psr: 600f0013
    [ 3569.417902] sp : dbaadf18  ip : 00000003  fp : 7f5d3bbe
    [ 3569.430014] r10: 00000000  r9 : 00000003  r8 : bef21ab8
    [ 3569.435535] r7 : dbbc0f7c  r6 : dbbc0f18  r5 : bef21ab8  r4 : 00000000
    [ 3569.442427] r3 : 00000000  r2 : 00000000  r1 : 8004570a  r0 : dbbc0f18
    [ 3569.449323] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
    [ 3569.456858] Control: 10c5387d  Table: 9c894019  DAC: 00000051
    [ 3569.462927] Process wdctl (pid: 1429, stack limit = 0xdbaac220)
    [ 3569.469179] Stack: (0xdbaadf18 to 0xdbaae000)
    [ 3569.473790] df00:                                                       bef21ab8 dbf60e38
    [ 3569.482441] df20: dc91b840 8004570a bef21ab8 c03988a4 dbaadf48 dc854000 00000000 dd313850
    [ 3569.491092] df40: ddf033b8 0000570a dc91b80b dbaadf3c dbf60e38 00000020 c0df9250 c0df6c48
    [ 3569.499741] df60: dc91b840 8004570a 00000000 dc91b840 dc91b840 8004570a bef21ab8 00000003
    [ 3569.508389] df80: 00000000 c03989d4 bef21b74 7f5d3bad 00000003 00000036 c020fcc4 dbaac000
    [ 3569.517037] dfa0: 00000000 c020fb00 bef21b74 7f5d3bad 00000003 8004570a bef21ab8 00000001
    [ 3569.525685] dfc0: bef21b74 7f5d3bad 00000003 00000036 00000001 00000000 7f5e4eb0 7f5d3bbe
    [ 3569.534334] dfe0: 7f5e4f10 bef21a3c 7f5d0a54 b6e97e0c a00f0010 00000003 00000000 00000000
    [ 3569.543038] [<bf0ab138>] (omap_wdt_get_timeleft [omap_wdt]) from [<c0739c54>] (watchdog_ioctl+0x3cc/0x42c)
    [ 3569.553266] [<c0739c54>] (watchdog_ioctl) from [<c03988a4>] (do_vfs_ioctl+0x5bc/0x698)
    [ 3569.561648] [<c03988a4>] (do_vfs_ioctl) from [<c03989d4>] (SyS_ioctl+0x54/0x7c)
    [ 3569.569400] [<c03989d4>] (SyS_ioctl) from [<c020fb00>] (ret_fast_syscall+0x0/0x3c)
    [ 3569.577413] Code: e12fff1e e52de004 e8bd4000 e5903060 (e5933088)
    [ 3569.584089] ---[ end trace cec3039bd3ae610a ]---

    Cc: <stable@vger.kernel.org> # v4.2+
    Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
    Acked-by: Lars Poeschel <poeschel@lemonage.de>
    Reviewed-by: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: Wim Van Sebroeck <wim@iguana.be>

For completeness, I added the overal diff below.

Greetings,
Wim.

================================================================================
0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Dec 4, 2015
…patch-fixes

ERROR: code indent should use tabs where possible
torvalds#171: FILE: mm/page_idle.c:75:
+                if (!pmd_present(*pmd))$

WARNING: please, no spaces at the start of a line
torvalds#171: FILE: mm/page_idle.c:75:
+                if (!pmd_present(*pmd))$

WARNING: Missing a blank line after declarations
torvalds#194: FILE: mm/page_idle.c:93:
+		pmd_t pmde = *pmd;
+		barrier();

WARNING: Missing a blank line after declarations
torvalds#304: FILE: mm/rmap.c:867:
+		pmd_t pmde = *pmd;
+		barrier();

total: 1 errors, 3 warnings, 327 lines checked

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-prepare-page_referenced-and-page_idle-to-new-thp-refcounting.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Dec 7, 2015
…patch-fixes

ERROR: code indent should use tabs where possible
torvalds#171: FILE: mm/page_idle.c:75:
+                if (!pmd_present(*pmd))$

WARNING: please, no spaces at the start of a line
torvalds#171: FILE: mm/page_idle.c:75:
+                if (!pmd_present(*pmd))$

WARNING: Missing a blank line after declarations
torvalds#194: FILE: mm/page_idle.c:93:
+		pmd_t pmde = *pmd;
+		barrier();

WARNING: Missing a blank line after declarations
torvalds#304: FILE: mm/rmap.c:867:
+		pmd_t pmde = *pmd;
+		barrier();

total: 1 errors, 3 warnings, 327 lines checked

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-prepare-page_referenced-and-page_idle-to-new-thp-refcounting.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Dec 9, 2015
…patch-fixes

ERROR: code indent should use tabs where possible
torvalds#171: FILE: mm/page_idle.c:75:
+                if (!pmd_present(*pmd))$

WARNING: please, no spaces at the start of a line
torvalds#171: FILE: mm/page_idle.c:75:
+                if (!pmd_present(*pmd))$

WARNING: Missing a blank line after declarations
torvalds#194: FILE: mm/page_idle.c:93:
+		pmd_t pmde = *pmd;
+		barrier();

WARNING: Missing a blank line after declarations
torvalds#304: FILE: mm/rmap.c:867:
+		pmd_t pmde = *pmd;
+		barrier();

total: 1 errors, 3 warnings, 327 lines checked

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-prepare-page_referenced-and-page_idle-to-new-thp-refcounting.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
ddstreet pushed a commit to ddstreet/linux that referenced this pull request Dec 10, 2015
…patch-fixes

ERROR: code indent should use tabs where possible
torvalds#171: FILE: mm/page_idle.c:75:
+                if (!pmd_present(*pmd))$

WARNING: please, no spaces at the start of a line
torvalds#171: FILE: mm/page_idle.c:75:
+                if (!pmd_present(*pmd))$

WARNING: Missing a blank line after declarations
torvalds#194: FILE: mm/page_idle.c:93:
+		pmd_t pmde = *pmd;
+		barrier();

WARNING: Missing a blank line after declarations
torvalds#304: FILE: mm/rmap.c:867:
+		pmd_t pmde = *pmd;
+		barrier();

total: 1 errors, 3 warnings, 327 lines checked

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-prepare-page_referenced-and-page_idle-to-new-thp-refcounting.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Dec 10, 2015
…patch-fixes

ERROR: code indent should use tabs where possible
torvalds#171: FILE: mm/page_idle.c:75:
+                if (!pmd_present(*pmd))$

WARNING: please, no spaces at the start of a line
torvalds#171: FILE: mm/page_idle.c:75:
+                if (!pmd_present(*pmd))$

WARNING: Missing a blank line after declarations
torvalds#194: FILE: mm/page_idle.c:93:
+		pmd_t pmde = *pmd;
+		barrier();

WARNING: Missing a blank line after declarations
torvalds#304: FILE: mm/rmap.c:867:
+		pmd_t pmde = *pmd;
+		barrier();

total: 1 errors, 3 warnings, 327 lines checked

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-prepare-page_referenced-and-page_idle-to-new-thp-refcounting.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Dec 11, 2015
…patch-fixes

ERROR: code indent should use tabs where possible
torvalds#171: FILE: mm/page_idle.c:75:
+                if (!pmd_present(*pmd))$

WARNING: please, no spaces at the start of a line
torvalds#171: FILE: mm/page_idle.c:75:
+                if (!pmd_present(*pmd))$

WARNING: Missing a blank line after declarations
torvalds#194: FILE: mm/page_idle.c:93:
+		pmd_t pmde = *pmd;
+		barrier();

WARNING: Missing a blank line after declarations
torvalds#304: FILE: mm/rmap.c:867:
+		pmd_t pmde = *pmd;
+		barrier();

total: 1 errors, 3 warnings, 327 lines checked

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-prepare-page_referenced-and-page_idle-to-new-thp-refcounting.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
ddstreet pushed a commit to ddstreet/linux that referenced this pull request Dec 11, 2015
…patch-fixes

ERROR: code indent should use tabs where possible
torvalds#171: FILE: mm/page_idle.c:75:
+                if (!pmd_present(*pmd))$

WARNING: please, no spaces at the start of a line
torvalds#171: FILE: mm/page_idle.c:75:
+                if (!pmd_present(*pmd))$

WARNING: Missing a blank line after declarations
torvalds#194: FILE: mm/page_idle.c:93:
+		pmd_t pmde = *pmd;
+		barrier();

WARNING: Missing a blank line after declarations
torvalds#304: FILE: mm/rmap.c:867:
+		pmd_t pmde = *pmd;
+		barrier();

total: 1 errors, 3 warnings, 327 lines checked

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-prepare-page_referenced-and-page_idle-to-new-thp-refcounting.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Dec 17, 2015
As a preparatory change for switching LPC32xx mach support to common
clock framework fix clk_enable/clk_disable calls without matching
clk_prepare/clk_unprepare.

The driver can not be used on a platform with common clock framework
until clk_prepare/clk_unprepare calls are added, otherwise clk_enable
calls will fail and a WARN is generated:

    # echo 1 > /sys/bus/platform/drivers/lpc32xx-pwm/4005c000.pwm/pwm/pwmchip0/pwm0/enable
    ------------[ cut here ]------------
    WARNING: CPU: 0 PID: 701 at drivers/clk/clk.c:727 clk_core_enable+0x2c/0xa4()
    Modules linked in: sc16is7xx
    CPU: 0 PID: 701 Comm: sh Tainted: G        W       4.3.0-rc2+ torvalds#171
    Hardware name: LPC32XX SoC (Flattened Device Tree)
    Backtrace:
    [<>] (dump_backtrace) from [<>] (show_stack+0x18/0x1c)
    [<>] (show_stack) from [<>] (dump_stack+0x20/0x28)
    [<>] (dump_stack) from [<>] (warn_slowpath_common+0x90/0xb8)
    [<>] (warn_slowpath_common) from [<>] (warn_slowpath_null+0x24/0x2c)
    [<>] (warn_slowpath_null) from [<>] (clk_core_enable+0x2c/0xa4)
    [<>] (clk_core_enable) from [<>] (clk_enable+0x24/0x38)
    [<>] (clk_enable) from [<>] (lpc32xx_pwm_enable+0x1c/0x40)
    [<>] (lpc32xx_pwm_enable) from [<>] (pwm_enable+0x48/0x5c)
    [<>] (pwm_enable) from [<>] (pwm_enable_store+0x5c/0x78)
    [<>] (pwm_enable_store) from [<>] (dev_attr_store+0x20/0x2c)
    [<>] (dev_attr_store) from [<>] (sysfs_kf_write+0x44/0x50)
    [<>] (sysfs_kf_write) from [<>] (kernfs_fop_write+0x134/0x194)
    [<>] (kernfs_fop_write) from [<>] (__vfs_write+0x34/0xdc)
    [<>] (__vfs_write) from [<>] (vfs_write+0xb8/0x140)
    [<>] (vfs_write) from [<>] (SyS_write+0x50/0x90)
    [<>] (SyS_write) from [<>] (ret_fast_syscall+0x0/0x38)

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Dec 18, 2015
…patch-fixes

ERROR: code indent should use tabs where possible
torvalds#171: FILE: mm/page_idle.c:75:
+                if (!pmd_present(*pmd))$

WARNING: please, no spaces at the start of a line
torvalds#171: FILE: mm/page_idle.c:75:
+                if (!pmd_present(*pmd))$

WARNING: Missing a blank line after declarations
torvalds#194: FILE: mm/page_idle.c:93:
+		pmd_t pmde = *pmd;
+		barrier();

WARNING: Missing a blank line after declarations
torvalds#304: FILE: mm/rmap.c:867:
+		pmd_t pmde = *pmd;
+		barrier();

total: 1 errors, 3 warnings, 327 lines checked

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-prepare-page_referenced-and-page_idle-to-new-thp-refcounting.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Jan 1, 2016
…patch-fixes

ERROR: code indent should use tabs where possible
torvalds#171: FILE: mm/page_idle.c:75:
+                if (!pmd_present(*pmd))$

WARNING: please, no spaces at the start of a line
torvalds#171: FILE: mm/page_idle.c:75:
+                if (!pmd_present(*pmd))$

WARNING: Missing a blank line after declarations
torvalds#194: FILE: mm/page_idle.c:93:
+		pmd_t pmde = *pmd;
+		barrier();

WARNING: Missing a blank line after declarations
torvalds#304: FILE: mm/rmap.c:867:
+		pmd_t pmde = *pmd;
+		barrier();

total: 1 errors, 3 warnings, 327 lines checked

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-prepare-page_referenced-and-page_idle-to-new-thp-refcounting.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Jan 6, 2016
…patch-fixes

ERROR: code indent should use tabs where possible
torvalds#171: FILE: mm/page_idle.c:75:
+                if (!pmd_present(*pmd))$

WARNING: please, no spaces at the start of a line
torvalds#171: FILE: mm/page_idle.c:75:
+                if (!pmd_present(*pmd))$

WARNING: Missing a blank line after declarations
torvalds#194: FILE: mm/page_idle.c:93:
+		pmd_t pmde = *pmd;
+		barrier();

WARNING: Missing a blank line after declarations
torvalds#304: FILE: mm/rmap.c:867:
+		pmd_t pmde = *pmd;
+		barrier();

total: 1 errors, 3 warnings, 327 lines checked

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-prepare-page_referenced-and-page_idle-to-new-thp-refcounting.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Jan 13, 2016
…patch-fixes

ERROR: code indent should use tabs where possible
torvalds#171: FILE: mm/page_idle.c:75:
+                if (!pmd_present(*pmd))$

WARNING: please, no spaces at the start of a line
torvalds#171: FILE: mm/page_idle.c:75:
+                if (!pmd_present(*pmd))$

WARNING: Missing a blank line after declarations
torvalds#194: FILE: mm/page_idle.c:93:
+		pmd_t pmde = *pmd;
+		barrier();

WARNING: Missing a blank line after declarations
torvalds#304: FILE: mm/rmap.c:867:
+		pmd_t pmde = *pmd;
+		barrier();

total: 1 errors, 3 warnings, 327 lines checked

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-prepare-page_referenced-and-page_idle-to-new-thp-refcounting.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Jan 14, 2016
…patch-fixes

ERROR: code indent should use tabs where possible
torvalds#171: FILE: mm/page_idle.c:75:
+                if (!pmd_present(*pmd))$

WARNING: please, no spaces at the start of a line
torvalds#171: FILE: mm/page_idle.c:75:
+                if (!pmd_present(*pmd))$

WARNING: Missing a blank line after declarations
torvalds#194: FILE: mm/page_idle.c:93:
+		pmd_t pmde = *pmd;
+		barrier();

WARNING: Missing a blank line after declarations
torvalds#304: FILE: mm/rmap.c:867:
+		pmd_t pmde = *pmd;
+		barrier();

total: 1 errors, 3 warnings, 327 lines checked

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-prepare-page_referenced-and-page_idle-to-new-thp-refcounting.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Jan 15, 2016
…patch-fixes

ERROR: code indent should use tabs where possible
torvalds#171: FILE: mm/page_idle.c:75:
+                if (!pmd_present(*pmd))$

WARNING: please, no spaces at the start of a line
torvalds#171: FILE: mm/page_idle.c:75:
+                if (!pmd_present(*pmd))$

WARNING: Missing a blank line after declarations
torvalds#194: FILE: mm/page_idle.c:93:
+		pmd_t pmde = *pmd;
+		barrier();

WARNING: Missing a blank line after declarations
torvalds#304: FILE: mm/rmap.c:867:
+		pmd_t pmde = *pmd;
+		barrier();

total: 1 errors, 3 warnings, 327 lines checked

NOTE: Whitespace errors detected.
      You may wish to use scripts/cleanpatch or scripts/cleanfile

./patches/mm-prepare-page_referenced-and-page_idle-to-new-thp-refcounting.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Jan 19, 2016
In this atomic age, we can't trust the plane->fb pointer anymore.
It might get update too late. Instead we are supposed to use the
plane_state->fb pointer instead. Let's do that in
intel_plane_obj_offset() and avoid problems from dereferencing the
potentially stale plane->fb pointer.

Paulo found this with 'kms_frontbuffer_tracking --show-hidden --run-subtest nop-1p-rte'
but it can be reproduced with just plain old kms_setplane.

I was too lazy to bisect this, so not sure exactly when it broke. The
most obvious candidate
commit ce7f172 ("drm/i915: Fix i915_ggtt_view_equal to handle rotation correctly")
was actually still fine, so it must have broken some time after that.

Here's the resulting fireworks:
BUG: unable to handle kernel NULL pointer dereference at           (null)
IP: [<ffffffffa02d2d9a>] intel_fill_fb_ggtt_view+0x1b/0x15a [i915]
PGD 8a5f6067 PUD 8a5f5067 PMD 0
Oops: 0000 [#1] PREEMPT SMP
Modules linked in: i915 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm intel_gtt agpgart netconsole mousedev hid_generic psmouse usbhid atkbd libps2 coretemp hwmon efi_pstore intel_rapl iosf_mbi x86_pkg_temp_thermal efivars pcspkr e1000e sdhci_pci ptp pps_core sdhci i2c_i801 mmc_core i2c_hid hid i8042 serio evdev sch_fq_codel ip_tables x_tables ipv6 autofs4
CPU: 1 PID: 260 Comm: kms_plane Not tainted 4.4.0-skl+ torvalds#171
Hardware name: Intel Corporation Skylake Client platform/Skylake Y LPDDR3 RVP3, BIOS SKLSE2R1.R00.B104.B00.1511030553 11/03/2015
task: ffff88008bde2d80 ti: ffff88008a6ec000 task.ti: ffff88008a6ec000
RIP: 0010:[<ffffffffa02d2d9a>]  [<ffffffffa02d2d9a>] intel_fill_fb_ggtt_view+0x1b/0x15a [i915]
RSP: 0018:ffff88008a6efa10  EFLAGS: 00010086
RAX: 0000000000000001 RBX: ffff8801674f4240 RCX: 0000000000000014
RDX: ffff88008a7440c0 RSI: 0000000000000000 RDI: ffff88008a6efa40
RBP: ffff88008a6efa30 R08: ffff88008bde3598 R09: 0000000000000001
R10: ffff88008b782000 R11: 0000000000000000 R12: 0000000000000000
R13: ffff88008a7440c0 R14: 0000000000000000 R15: ffff88008a7449c0
FS:  00007fa0c07a28c0(0000) GS:ffff88016ec40000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000008a6ff000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Stack:
 ffff8801674f4240 0000000000000000 ffff88008a7440c0 0000000000000000
 ffff88008a6efaa0 ffffffffa02daf25 ffffffff814ec80e 0000000000070298
 ffff8800850d0000 ffff88008a6efaa0 ffffffffa02c49c2 0000000000000002
Call Trace:
 [<ffffffffa02daf25>] intel_plane_obj_offset+0x2d/0xa9 [i915]
 [<ffffffff814ec80e>] ? _raw_spin_unlock_irqrestore+0x4b/0x60
 [<ffffffffa02c49c2>] ? gen9_write32+0x2e8/0x3b8 [i915]
 [<ffffffffa02eecfc>] skl_update_plane+0x203/0x4c5 [i915]
 [<ffffffffa02ca1ab>] intel_plane_atomic_update+0x53/0x6a [i915]
 [<ffffffffa02494a4>] drm_atomic_helper_commit_planes_on_crtc+0x142/0x1d5 [drm_kms_helper]
 [<ffffffffa02de44b>] intel_atomic_commit+0x1262/0x1350 [i915]
 [<ffffffffa024a0ee>] ? __drm_atomic_helper_crtc_duplicate_state+0x2f/0x41 [drm_kms_helper]
 [<ffffffffa01ef089>] ? drm_atomic_check_only+0x3e3/0x552 [drm]
 [<ffffffffa01ef245>] drm_atomic_commit+0x4d/0x52 [drm]
 [<ffffffffa024996b>] drm_atomic_helper_update_plane+0xcb/0x118 [drm_kms_helper]
 [<ffffffffa01e42e8>] __setplane_internal+0x1c8/0x224 [drm]
 [<ffffffffa01e477f>] drm_mode_setplane+0x14e/0x172 [drm]
 [<ffffffffa01d8117>] drm_ioctl+0x265/0x3ad [drm]
 [<ffffffffa01e4631>] ? drm_mode_cursor_common+0x158/0x158 [drm]
 [<ffffffff810d00ab>] ? current_kernel_time64+0x5e/0x98
 [<ffffffff810a76ea>] ? trace_hardirqs_on_caller+0x17a/0x196
 [<ffffffff8119880f>] do_vfs_ioctl+0x42b/0x4ea
 [<ffffffff811a2b72>] ? __fget_light+0x4d/0x71
 [<ffffffff81198911>] SyS_ioctl+0x43/0x61
 [<ffffffff814ed057>] entry_SYSCALL_64_fastpath+0x12/0x6f

Cc: drm-intel-fixes@lists.freedesktop.org
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Testcase: igt/kms_plane
Reported-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Jan 25, 2016
In this atomic age, we can't trust the plane->fb pointer anymore.
It might get update too late. Instead we are supposed to use the
plane_state->fb pointer instead. Let's do that in
intel_plane_obj_offset() and avoid problems from dereferencing the
potentially stale plane->fb pointer.

Paulo found this with 'kms_frontbuffer_tracking --show-hidden --run-subtest nop-1p-rte'
but it can be reproduced with just plain old kms_setplane.

I was too lazy to bisect this, so not sure exactly when it broke. The
most obvious candidate
commit ce7f172 ("drm/i915: Fix i915_ggtt_view_equal to handle rotation correctly")
was actually still fine, so it must have broken some time after that.

Here's the resulting fireworks:
BUG: unable to handle kernel NULL pointer dereference at           (null)
IP: [<ffffffffa02d2d9a>] intel_fill_fb_ggtt_view+0x1b/0x15a [i915]
PGD 8a5f6067 PUD 8a5f5067 PMD 0
Oops: 0000 [#1] PREEMPT SMP
Modules linked in: i915 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm intel_gtt agpgart netconsole mousedev hid_generic psmouse usbhid atkbd libps2 coretemp hwmon efi_pstore intel_rapl iosf_mbi x86_pkg_temp_thermal efivars pcspkr e1000e sdhci_pci ptp pps_core sdhci i2c_i801 mmc_core i2c_hid hid i8042 serio evdev sch_fq_codel ip_tables x_tables ipv6 autofs4
CPU: 1 PID: 260 Comm: kms_plane Not tainted 4.4.0-skl+ torvalds#171
Hardware name: Intel Corporation Skylake Client platform/Skylake Y LPDDR3 RVP3, BIOS SKLSE2R1.R00.B104.B00.1511030553 11/03/2015
task: ffff88008bde2d80 ti: ffff88008a6ec000 task.ti: ffff88008a6ec000
RIP: 0010:[<ffffffffa02d2d9a>]  [<ffffffffa02d2d9a>] intel_fill_fb_ggtt_view+0x1b/0x15a [i915]
RSP: 0018:ffff88008a6efa10  EFLAGS: 00010086
RAX: 0000000000000001 RBX: ffff8801674f4240 RCX: 0000000000000014
RDX: ffff88008a7440c0 RSI: 0000000000000000 RDI: ffff88008a6efa40
RBP: ffff88008a6efa30 R08: ffff88008bde3598 R09: 0000000000000001
R10: ffff88008b782000 R11: 0000000000000000 R12: 0000000000000000
R13: ffff88008a7440c0 R14: 0000000000000000 R15: ffff88008a7449c0
FS:  00007fa0c07a28c0(0000) GS:ffff88016ec40000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000008a6ff000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Stack:
 ffff8801674f4240 0000000000000000 ffff88008a7440c0 0000000000000000
 ffff88008a6efaa0 ffffffffa02daf25 ffffffff814ec80e 0000000000070298
 ffff8800850d0000 ffff88008a6efaa0 ffffffffa02c49c2 0000000000000002
Call Trace:
 [<ffffffffa02daf25>] intel_plane_obj_offset+0x2d/0xa9 [i915]
 [<ffffffff814ec80e>] ? _raw_spin_unlock_irqrestore+0x4b/0x60
 [<ffffffffa02c49c2>] ? gen9_write32+0x2e8/0x3b8 [i915]
 [<ffffffffa02eecfc>] skl_update_plane+0x203/0x4c5 [i915]
 [<ffffffffa02ca1ab>] intel_plane_atomic_update+0x53/0x6a [i915]
 [<ffffffffa02494a4>] drm_atomic_helper_commit_planes_on_crtc+0x142/0x1d5 [drm_kms_helper]
 [<ffffffffa02de44b>] intel_atomic_commit+0x1262/0x1350 [i915]
 [<ffffffffa024a0ee>] ? __drm_atomic_helper_crtc_duplicate_state+0x2f/0x41 [drm_kms_helper]
 [<ffffffffa01ef089>] ? drm_atomic_check_only+0x3e3/0x552 [drm]
 [<ffffffffa01ef245>] drm_atomic_commit+0x4d/0x52 [drm]
 [<ffffffffa024996b>] drm_atomic_helper_update_plane+0xcb/0x118 [drm_kms_helper]
 [<ffffffffa01e42e8>] __setplane_internal+0x1c8/0x224 [drm]
 [<ffffffffa01e477f>] drm_mode_setplane+0x14e/0x172 [drm]
 [<ffffffffa01d8117>] drm_ioctl+0x265/0x3ad [drm]
 [<ffffffffa01e4631>] ? drm_mode_cursor_common+0x158/0x158 [drm]
 [<ffffffff810d00ab>] ? current_kernel_time64+0x5e/0x98
 [<ffffffff810a76ea>] ? trace_hardirqs_on_caller+0x17a/0x196
 [<ffffffff8119880f>] do_vfs_ioctl+0x42b/0x4ea
 [<ffffffff811a2b72>] ? __fget_light+0x4d/0x71
 [<ffffffff81198911>] SyS_ioctl+0x43/0x61
 [<ffffffff814ed057>] entry_SYSCALL_64_fastpath+0x12/0x6f

Cc: drm-intel-fixes@lists.freedesktop.org
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Testcase: igt/kms_plane
Reported-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1453220597-28973-1-git-send-email-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Feb 1, 2016
In this atomic age, we can't trust the plane->fb pointer anymore.
It might get update too late. Instead we are supposed to use the
plane_state->fb pointer instead. Let's do that in
intel_plane_obj_offset() and avoid problems from dereferencing the
potentially stale plane->fb pointer.

Paulo found this with 'kms_frontbuffer_tracking --show-hidden --run-subtest nop-1p-rte'
but it can be reproduced with just plain old kms_setplane.

I was too lazy to bisect this, so not sure exactly when it broke. The
most obvious candidate
commit ce7f172 ("drm/i915: Fix i915_ggtt_view_equal to handle rotation correctly")
was actually still fine, so it must have broken some time after that.

Here's the resulting fireworks:
BUG: unable to handle kernel NULL pointer dereference at           (null)
IP: [<ffffffffa02d2d9a>] intel_fill_fb_ggtt_view+0x1b/0x15a [i915]
PGD 8a5f6067 PUD 8a5f5067 PMD 0
Oops: 0000 [#1] PREEMPT SMP
Modules linked in: i915 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops drm intel_gtt agpgart netconsole mousedev hid_generic psmouse usbhid atkbd libps2 coretemp hwmon efi_pstore intel_rapl iosf_mbi x86_pkg_temp_thermal efivars pcspkr e1000e sdhci_pci ptp pps_core sdhci i2c_i801 mmc_core i2c_hid hid i8042 serio evdev sch_fq_codel ip_tables x_tables ipv6 autofs4
CPU: 1 PID: 260 Comm: kms_plane Not tainted 4.4.0-skl+ torvalds#171
Hardware name: Intel Corporation Skylake Client platform/Skylake Y LPDDR3 RVP3, BIOS SKLSE2R1.R00.B104.B00.1511030553 11/03/2015
task: ffff88008bde2d80 ti: ffff88008a6ec000 task.ti: ffff88008a6ec000
RIP: 0010:[<ffffffffa02d2d9a>]  [<ffffffffa02d2d9a>] intel_fill_fb_ggtt_view+0x1b/0x15a [i915]
RSP: 0018:ffff88008a6efa10  EFLAGS: 00010086
RAX: 0000000000000001 RBX: ffff8801674f4240 RCX: 0000000000000014
RDX: ffff88008a7440c0 RSI: 0000000000000000 RDI: ffff88008a6efa40
RBP: ffff88008a6efa30 R08: ffff88008bde3598 R09: 0000000000000001
R10: ffff88008b782000 R11: 0000000000000000 R12: 0000000000000000
R13: ffff88008a7440c0 R14: 0000000000000000 R15: ffff88008a7449c0
FS:  00007fa0c07a28c0(0000) GS:ffff88016ec40000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000008a6ff000 CR4: 00000000003406e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Stack:
 ffff8801674f4240 0000000000000000 ffff88008a7440c0 0000000000000000
 ffff88008a6efaa0 ffffffffa02daf25 ffffffff814ec80e 0000000000070298
 ffff8800850d0000 ffff88008a6efaa0 ffffffffa02c49c2 0000000000000002
Call Trace:
 [<ffffffffa02daf25>] intel_plane_obj_offset+0x2d/0xa9 [i915]
 [<ffffffff814ec80e>] ? _raw_spin_unlock_irqrestore+0x4b/0x60
 [<ffffffffa02c49c2>] ? gen9_write32+0x2e8/0x3b8 [i915]
 [<ffffffffa02eecfc>] skl_update_plane+0x203/0x4c5 [i915]
 [<ffffffffa02ca1ab>] intel_plane_atomic_update+0x53/0x6a [i915]
 [<ffffffffa02494a4>] drm_atomic_helper_commit_planes_on_crtc+0x142/0x1d5 [drm_kms_helper]
 [<ffffffffa02de44b>] intel_atomic_commit+0x1262/0x1350 [i915]
 [<ffffffffa024a0ee>] ? __drm_atomic_helper_crtc_duplicate_state+0x2f/0x41 [drm_kms_helper]
 [<ffffffffa01ef089>] ? drm_atomic_check_only+0x3e3/0x552 [drm]
 [<ffffffffa01ef245>] drm_atomic_commit+0x4d/0x52 [drm]
 [<ffffffffa024996b>] drm_atomic_helper_update_plane+0xcb/0x118 [drm_kms_helper]
 [<ffffffffa01e42e8>] __setplane_internal+0x1c8/0x224 [drm]
 [<ffffffffa01e477f>] drm_mode_setplane+0x14e/0x172 [drm]
 [<ffffffffa01d8117>] drm_ioctl+0x265/0x3ad [drm]
 [<ffffffffa01e4631>] ? drm_mode_cursor_common+0x158/0x158 [drm]
 [<ffffffff810d00ab>] ? current_kernel_time64+0x5e/0x98
 [<ffffffff810a76ea>] ? trace_hardirqs_on_caller+0x17a/0x196
 [<ffffffff8119880f>] do_vfs_ioctl+0x42b/0x4ea
 [<ffffffff811a2b72>] ? __fget_light+0x4d/0x71
 [<ffffffff81198911>] SyS_ioctl+0x43/0x61
 [<ffffffff814ed057>] entry_SYSCALL_64_fastpath+0x12/0x6f

Cc: drm-intel-fixes@lists.freedesktop.org
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Testcase: igt/kms_plane
Reported-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1453220597-28973-1-git-send-email-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit e794129)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Mar 28, 2016
ERROR: "foo * bar" should be "foo *bar"
torvalds#171: FILE: include/linux/mempool.h:35:
+extern void * mempool_alloc(mempool_t *pool, gfp_t gfp_mask) __malloc;

Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Mar 30, 2016
ERROR: "foo * bar" should be "foo *bar"
torvalds#171: FILE: include/linux/mempool.h:35:
+extern void * mempool_alloc(mempool_t *pool, gfp_t gfp_mask) __malloc;

Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
0day-ci pushed a commit to 0day-ci/linux that referenced this pull request Apr 4, 2016
ERROR: "foo * bar" should be "foo *bar"
torvalds#171: FILE: include/linux/mempool.h:35:
+extern void * mempool_alloc(mempool_t *pool, gfp_t gfp_mask) __malloc;

Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fengguang pushed a commit to 0day-ci/linux that referenced this pull request Nov 7, 2018
We will meet below issue due to mutex_lock() is called in interrupt context.
The mutex lock is used to protect the pattern trigger data, but before changing
new pattern trigger data (pattern values or repeat value) by users, we always
cancel the timer firstly to clear previous patterns' performance. That means
there is no race in pattern_trig_timer_function(), so we can drop the mutex
lock in pattern_trig_timer_function() to avoid this issue.

Moreover we can move the timer cancelling into mutex protection, since there
is no deadlock risk if we remove the mutex lock in pattern_trig_timer_function().

BUG: sleeping function called from invalid context at kernel/locking/mutex.c:254
in_atomic(): 1, irqs_disabled(): 0, pid: 0, name: swapper/1
CPU: 1 PID: 0 Comm: swapper/1 Not tainted
4.20.0-rc1-koelsch-00841-ga338c8181013c1a9 torvalds#171
Hardware name: Generic R-Car Gen2 (Flattened Device Tree)
[<c020f19c>] (unwind_backtrace) from [<c020aecc>] (show_stack+0x10/0x14)
[<c020aecc>] (show_stack) from [<c07affb8>] (dump_stack+0x7c/0x9c)
[<c07affb8>] (dump_stack) from [<c02417d4>] (___might_sleep+0xf4/0x158)
[<c02417d4>] (___might_sleep) from [<c07c92c4>] (mutex_lock+0x18/0x60)
[<c07c92c4>] (mutex_lock) from [<c067b28c>] (pattern_trig_timer_function+0x1c/0x11c)
[<c067b28c>] (pattern_trig_timer_function) from [<c027f6fc>] (call_timer_fn+0x1c/0x90)
[<c027f6fc>] (call_timer_fn) from [<c027f944>] (expire_timers+0x94/0xa4)
[<c027f944>] (expire_timers) from [<c027fc98>] (run_timer_softirq+0x108/0x15c)
[<c027fc98>] (run_timer_softirq) from [<c02021cc>] (__do_softirq+0x1d4/0x258)
[<c02021cc>] (__do_softirq) from [<c0224d24>] (irq_exit+0x64/0xc4)
[<c0224d24>] (irq_exit) from [<c0268dd0>] (__handle_domain_irq+0x80/0xb4)
[<c0268dd0>] (__handle_domain_irq) from [<c045e1b0>] (gic_handle_irq+0x58/0x90)
[<c045e1b0>] (gic_handle_irq) from [<c02019f8>] (__irq_svc+0x58/0x74)
Exception stack(0xeb483f60 to 0xeb483fa8)
3f60: 00000000 00000000 eb9afaa0 c0217e80 00000000 ffffe000 00000000 c0e06408
3f80: 00000002 c0e0647c c0c6a5f0 00000000 c0e04900 eb483fb0 c0207ea8 c0207e98
3fa0: 60020013 ffffffff
[<c02019f8>] (__irq_svc) from [<c0207e98>] (arch_cpu_idle+0x1c/0x38)
[<c0207e98>] (arch_cpu_idle) from [<c0247ca8>] (do_idle+0x138/0x268)
[<c0247ca8>] (do_idle) from [<c0248050>] (cpu_startup_entry+0x18/0x1c)
[<c0248050>] (cpu_startup_entry) from [<402022ec>] (0x402022ec)

Fixes: 5fd752b ("leds: core: Introduce LED pattern trigger")
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
fengguang pushed a commit to 0day-ci/linux that referenced this pull request Nov 7, 2018
We will meet below issue due to mutex_lock() is called in interrupt context.
The mutex lock is used to protect the pattern trigger data, but before changing
new pattern trigger data (pattern values or repeat value) by users, we always
cancel the timer firstly to clear previous patterns' performance. That means
there is no race in pattern_trig_timer_function(), so we can drop the mutex
lock in pattern_trig_timer_function() to avoid this issue.

Moreover we can move the timer cancelling into mutex protection, since there
is no deadlock risk if we remove the mutex lock in pattern_trig_timer_function().

BUG: sleeping function called from invalid context at kernel/locking/mutex.c:254
in_atomic(): 1, irqs_disabled(): 0, pid: 0, name: swapper/1
CPU: 1 PID: 0 Comm: swapper/1 Not tainted
4.20.0-rc1-koelsch-00841-ga338c8181013c1a9 torvalds#171
Hardware name: Generic R-Car Gen2 (Flattened Device Tree)
[<c020f19c>] (unwind_backtrace) from [<c020aecc>] (show_stack+0x10/0x14)
[<c020aecc>] (show_stack) from [<c07affb8>] (dump_stack+0x7c/0x9c)
[<c07affb8>] (dump_stack) from [<c02417d4>] (___might_sleep+0xf4/0x158)
[<c02417d4>] (___might_sleep) from [<c07c92c4>] (mutex_lock+0x18/0x60)
[<c07c92c4>] (mutex_lock) from [<c067b28c>] (pattern_trig_timer_function+0x1c/0x11c)
[<c067b28c>] (pattern_trig_timer_function) from [<c027f6fc>] (call_timer_fn+0x1c/0x90)
[<c027f6fc>] (call_timer_fn) from [<c027f944>] (expire_timers+0x94/0xa4)
[<c027f944>] (expire_timers) from [<c027fc98>] (run_timer_softirq+0x108/0x15c)
[<c027fc98>] (run_timer_softirq) from [<c02021cc>] (__do_softirq+0x1d4/0x258)
[<c02021cc>] (__do_softirq) from [<c0224d24>] (irq_exit+0x64/0xc4)
[<c0224d24>] (irq_exit) from [<c0268dd0>] (__handle_domain_irq+0x80/0xb4)
[<c0268dd0>] (__handle_domain_irq) from [<c045e1b0>] (gic_handle_irq+0x58/0x90)
[<c045e1b0>] (gic_handle_irq) from [<c02019f8>] (__irq_svc+0x58/0x74)
Exception stack(0xeb483f60 to 0xeb483fa8)
3f60: 00000000 00000000 eb9afaa0 c0217e80 00000000 ffffe000 00000000 c0e06408
3f80: 00000002 c0e0647c c0c6a5f0 00000000 c0e04900 eb483fb0 c0207ea8 c0207e98
3fa0: 60020013 ffffffff
[<c02019f8>] (__irq_svc) from [<c0207e98>] (arch_cpu_idle+0x1c/0x38)
[<c0207e98>] (arch_cpu_idle) from [<c0247ca8>] (do_idle+0x138/0x268)
[<c0247ca8>] (do_idle) from [<c0248050>] (cpu_startup_entry+0x18/0x1c)
[<c0248050>] (cpu_startup_entry) from [<402022ec>] (0x402022ec)

Fixes: 5fd752b ("leds: core: Introduce LED pattern trigger")
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
kraj pushed a commit to kraj/linux that referenced this pull request Nov 9, 2018
We will meet below issue due to mutex_lock() is called in interrupt context.
The mutex lock is used to protect the pattern trigger data, but before changing
new pattern trigger data (pattern values or repeat value) by users, we always
cancel the timer firstly to clear previous patterns' performance. That means
there is no race in pattern_trig_timer_function(), so we can drop the mutex
lock in pattern_trig_timer_function() to avoid this issue.

Moreover we can move the timer cancelling into mutex protection, since there
is no deadlock risk if we remove the mutex lock in pattern_trig_timer_function().

BUG: sleeping function called from invalid context at kernel/locking/mutex.c:254
in_atomic(): 1, irqs_disabled(): 0, pid: 0, name: swapper/1
CPU: 1 PID: 0 Comm: swapper/1 Not tainted
4.20.0-rc1-koelsch-00841-ga338c8181013c1a9 torvalds#171
Hardware name: Generic R-Car Gen2 (Flattened Device Tree)
[<c020f19c>] (unwind_backtrace) from [<c020aecc>] (show_stack+0x10/0x14)
[<c020aecc>] (show_stack) from [<c07affb8>] (dump_stack+0x7c/0x9c)
[<c07affb8>] (dump_stack) from [<c02417d4>] (___might_sleep+0xf4/0x158)
[<c02417d4>] (___might_sleep) from [<c07c92c4>] (mutex_lock+0x18/0x60)
[<c07c92c4>] (mutex_lock) from [<c067b28c>] (pattern_trig_timer_function+0x1c/0x11c)
[<c067b28c>] (pattern_trig_timer_function) from [<c027f6fc>] (call_timer_fn+0x1c/0x90)
[<c027f6fc>] (call_timer_fn) from [<c027f944>] (expire_timers+0x94/0xa4)
[<c027f944>] (expire_timers) from [<c027fc98>] (run_timer_softirq+0x108/0x15c)
[<c027fc98>] (run_timer_softirq) from [<c02021cc>] (__do_softirq+0x1d4/0x258)
[<c02021cc>] (__do_softirq) from [<c0224d24>] (irq_exit+0x64/0xc4)
[<c0224d24>] (irq_exit) from [<c0268dd0>] (__handle_domain_irq+0x80/0xb4)
[<c0268dd0>] (__handle_domain_irq) from [<c045e1b0>] (gic_handle_irq+0x58/0x90)
[<c045e1b0>] (gic_handle_irq) from [<c02019f8>] (__irq_svc+0x58/0x74)
Exception stack(0xeb483f60 to 0xeb483fa8)
3f60: 00000000 00000000 eb9afaa0 c0217e80 00000000 ffffe000 00000000 c0e06408
3f80: 00000002 c0e0647c c0c6a5f0 00000000 c0e04900 eb483fb0 c0207ea8 c0207e98
3fa0: 60020013 ffffffff
[<c02019f8>] (__irq_svc) from [<c0207e98>] (arch_cpu_idle+0x1c/0x38)
[<c0207e98>] (arch_cpu_idle) from [<c0247ca8>] (do_idle+0x138/0x268)
[<c0247ca8>] (do_idle) from [<c0248050>] (cpu_startup_entry+0x18/0x1c)
[<c0248050>] (cpu_startup_entry) from [<402022ec>] (0x402022ec)

Fixes: 5fd752b ("leds: core: Introduce LED pattern trigger")
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
igoropaniuk pushed a commit to igoropaniuk/linux that referenced this pull request Nov 18, 2020
Update 5.4-2.1.x-imx to v5.4.76 from stable
chombourger pushed a commit to chombourger/linux that referenced this pull request Feb 16, 2021
…from plsdk-2750 to processor-sdk-linux-4.19.y

* commit '3c4238882bee4590cb0b6d69c3ee4f96ad7efd38':
  net: ethernet: ti: ptp_bc: make pps_mux_sel gpios optional
  net: ethernet: ti: cpts: enhance pps gen/latch operations
  arm: dts: am57[1,2,4]x-idk-pps: break timers into pps_timer and latch_timer
  arm: dts: am57[1,2,4]x-idk-pps: use PIN_OUTPUT_PULLDOWN for off state
  dt-bindings: net : ptp_bc: Document optional parameter pps-sel[0,1]-gpios
  dt-bindings: net: ti-prueth: Document the optional pinctrl parameters for SYNC/LATCH signal
  dt-bindings: net: cpsw: document PPS related optional parameters
fengguang pushed a commit to 0day-ci/linux that referenced this pull request Mar 15, 2021
This commit fixes the following checkpatch.pl errors:

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#170: FILE: ./hal/HalBtc8723b1Ant.h:170:
    +void EXhalbtc8723b1ant_PowerOnSetting(struct BTC_COEXIST * pBtCoexist);

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#171: FILE: ./hal/HalBtc8723b1Ant.h:171:
    +void EXhalbtc8723b1ant_InitHwConfig(struct BTC_COEXIST * pBtCoexist, bool bWifiOnly);

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#172: FILE: ./hal/HalBtc8723b1Ant.h:172:
    +void EXhalbtc8723b1ant_InitCoexDm(struct BTC_COEXIST * pBtCoexist);

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#173: FILE: ./hal/HalBtc8723b1Ant.h:173:
    +void EXhalbtc8723b1ant_IpsNotify(struct BTC_COEXIST * pBtCoexist, u8 type);

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#174: FILE: ./hal/HalBtc8723b1Ant.h:174:
    +void EXhalbtc8723b1ant_LpsNotify(struct BTC_COEXIST * pBtCoexist, u8 type);

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#175: FILE: ./hal/HalBtc8723b1Ant.h:175:
    +void EXhalbtc8723b1ant_ScanNotify(struct BTC_COEXIST * pBtCoexist, u8 type);

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#176: FILE: ./hal/HalBtc8723b1Ant.h:176:
    +void EXhalbtc8723b1ant_ConnectNotify(struct BTC_COEXIST * pBtCoexist, u8 type);

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#177: FILE: ./hal/HalBtc8723b1Ant.h:177:
    +void EXhalbtc8723b1ant_MediaStatusNotify(struct BTC_COEXIST * pBtCoexist, u8 type);

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#178: FILE: ./hal/HalBtc8723b1Ant.h:178:
    +void EXhalbtc8723b1ant_SpecialPacketNotify(struct BTC_COEXIST * pBtCoexist, u8 type);

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#180: FILE: ./hal/HalBtc8723b1Ant.h:180:
    +	struct BTC_COEXIST * pBtCoexist, u8 *tmpBuf, u8 length

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#182: FILE: ./hal/HalBtc8723b1Ant.h:182:
    +void EXhalbtc8723b1ant_HaltNotify(struct BTC_COEXIST * pBtCoexist);

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#183: FILE: ./hal/HalBtc8723b1Ant.h:183:
    +void EXhalbtc8723b1ant_PnpNotify(struct BTC_COEXIST * pBtCoexist, u8 pnpState);

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#184: FILE: ./hal/HalBtc8723b1Ant.h:184:
    +void EXhalbtc8723b1ant_Periodical(struct BTC_COEXIST * pBtCoexist);

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#185: FILE: ./hal/HalBtc8723b1Ant.h:185:
    +void EXhalbtc8723b1ant_DisplayCoexInfo(struct BTC_COEXIST * pBtCoexist);

Signed-off-by: Marco Cesati <marcocesati@gmail.com>
fengguang pushed a commit to 0day-ci/linux that referenced this pull request Mar 16, 2021
This commit fixes the following checkpatch.pl errors:

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#170: FILE: ./hal/HalBtc8723b1Ant.h:170:
    +void EXhalbtc8723b1ant_PowerOnSetting(struct BTC_COEXIST * pBtCoexist);

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#171: FILE: ./hal/HalBtc8723b1Ant.h:171:
    +void EXhalbtc8723b1ant_InitHwConfig(struct BTC_COEXIST * pBtCoexist, bool bWifiOnly);

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#172: FILE: ./hal/HalBtc8723b1Ant.h:172:
    +void EXhalbtc8723b1ant_InitCoexDm(struct BTC_COEXIST * pBtCoexist);

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#173: FILE: ./hal/HalBtc8723b1Ant.h:173:
    +void EXhalbtc8723b1ant_IpsNotify(struct BTC_COEXIST * pBtCoexist, u8 type);

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#174: FILE: ./hal/HalBtc8723b1Ant.h:174:
    +void EXhalbtc8723b1ant_LpsNotify(struct BTC_COEXIST * pBtCoexist, u8 type);

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#175: FILE: ./hal/HalBtc8723b1Ant.h:175:
    +void EXhalbtc8723b1ant_ScanNotify(struct BTC_COEXIST * pBtCoexist, u8 type);

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#176: FILE: ./hal/HalBtc8723b1Ant.h:176:
    +void EXhalbtc8723b1ant_ConnectNotify(struct BTC_COEXIST * pBtCoexist, u8 type);

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#177: FILE: ./hal/HalBtc8723b1Ant.h:177:
    +void EXhalbtc8723b1ant_MediaStatusNotify(struct BTC_COEXIST * pBtCoexist, u8 type);

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#178: FILE: ./hal/HalBtc8723b1Ant.h:178:
    +void EXhalbtc8723b1ant_SpecialPacketNotify(struct BTC_COEXIST * pBtCoexist, u8 type);

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#180: FILE: ./hal/HalBtc8723b1Ant.h:180:
    +	struct BTC_COEXIST * pBtCoexist, u8 *tmpBuf, u8 length

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#182: FILE: ./hal/HalBtc8723b1Ant.h:182:
    +void EXhalbtc8723b1ant_HaltNotify(struct BTC_COEXIST * pBtCoexist);

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#183: FILE: ./hal/HalBtc8723b1Ant.h:183:
    +void EXhalbtc8723b1ant_PnpNotify(struct BTC_COEXIST * pBtCoexist, u8 pnpState);

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#184: FILE: ./hal/HalBtc8723b1Ant.h:184:
    +void EXhalbtc8723b1ant_Periodical(struct BTC_COEXIST * pBtCoexist);

    ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
    torvalds#185: FILE: ./hal/HalBtc8723b1Ant.h:185:
    +void EXhalbtc8723b1ant_DisplayCoexInfo(struct BTC_COEXIST * pBtCoexist);

Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Marco Cesati <marcocesati@gmail.com>
Link: https://lore.kernel.org/r/20210315170618.2566-4-marcocesati@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
mpe pushed a commit to mpe/linux that referenced this pull request Apr 9, 2021
Add `UserSlicePtrWriter::write`.
fengguang pushed a commit to 0day-ci/linux that referenced this pull request Feb 1, 2022
With CONFIG_MEMCG_KMEM and CONFIG_PROVE_LOCKING enabled (fedora
rawhide kernel), running a simple podman test tosses a circular
locking dependency warning. The podman container in question simpy
contains the echo command and the libc/ld-linux needed to run it. The
warning can be duplicated with just a single `podman build --network
host --layers=false -t localhost/echo .` command, although the exact
sequence that triggers the warning needs the task state to be changing
the frozen state as well. So, its easier to duplicate with a slightly
longer test case.

I've attempted to trigger the actual deadlock with some standalone
code and been unsuccessful, but looking at the code it appears to be a
legitimate deadlock if a signal is being sent to the process from
another thread while the task is migrating between cgroups.

Attached is a fix which I'm confident fixes the problem, but I'm not
really that confident in the fix since I don't fully understand all
the possible states in the cgroup code. The fix avoids the deadlock by
shifting the objcg->list manipulation to another spinlock and then
using list_del_rcu in obj_cgroup_release.

There is a bit more information in the actual BZ
https://bugzilla.redhat.com/show_bug.cgi?id=2033016 including a shell
script with the podman test/etc.

(this machine has a new 5.17 splat before in the network driver)
[   87.700526] ======================================================
[   87.706693] WARNING: possible circular locking dependency detected
[   87.712861] 5.17.0-rc2+ torvalds#171 Tainted: G        W
[   87.718161] ------------------------------------------------------
[   87.724328] podman/2371 is trying to acquire lock:
[   87.729107] ffffa723507a2838 (css_set_lock){..-.}-{2:2}, at: _raw_spin_lock_irqsave+0x1c/0x30
[   87.737636]
[   87.737636] but task is already holding lock:
[   87.743456] ffff577e760d88d8 (&sighand->siglock){....}-{2:2}, at: _raw_spin_lock_irqsave+0x1c/0x30
[   87.752409]
[   87.752409] which lock already depends on the new lock.
[   87.752409]
[   87.760572]
[   87.760572] the existing dependency chain (in reverse order) is:
[   87.768041]
[   87.768041] -> #1 (&sighand->siglock){....}-{2:2}:
[   87.774301]        __lock_acquire+0x444/0x9c0
[   87.778650]        lock_acquire.part.0+0xa8/0x1b0
[   87.783343]        lock_acquire+0x68/0x8c
[   87.787342]        __raw_spin_lock_irqsave+0x8c/0x140
[   87.792383]        _raw_spin_lock_irqsave+0x1c/0x30
[   87.797249]        __lock_task_sighand+0xa4/0x1d0
[   87.801944]        cgroup_freeze_task+0x28/0x80
[   87.806465]        cgroup_freezer_migrate_task+0x78/0xe0
[   87.811765]        cgroup_migrate_execute+0x33c/0x494
[   87.816807]        cgroup_update_dfl_csses+0x210/0x230
[   87.821935]        cgroup_subtree_control_write+0x41c/0x440
[   87.827497]        cgroup_file_write+0x90/0x260
[   87.832016]        kernfs_fop_write_iter+0x13c/0x1d0
[   87.836971]        new_sync_write+0xdc/0x15c
[   87.841230]        vfs_write+0x1cc/0x220
[   87.845141]        ksys_write+0x64/0xec
[   87.848966]        __arm64_sys_write+0x28/0x34
[   87.853398]        invoke_syscall+0x50/0x120
[   87.857657]        el0_svc_common.constprop.0+0x68/0x124
[   87.862957]        do_el0_svc+0x34/0x9c
[   87.866781]        el0_svc+0x5c/0x19c
[   87.870433]        el0t_64_sync_handler+0xa4/0x130
[   87.875213]        el0t_64_sync+0x1a4/0x1a8
[   87.879385]
[   87.879385] -> #0 (css_set_lock){..-.}-{2:2}:
[   87.885210]        check_prev_add+0xac/0x68c
[   87.889469]        validate_chain+0x3fc/0x590
[   87.893815]        __lock_acquire+0x444/0x9c0
[   87.898160]        lock_acquire.part.0+0xa8/0x1b0
[   87.902853]        lock_acquire+0x68/0x8c
[   87.906851]        __raw_spin_lock_irqsave+0x8c/0x140
[   87.911892]        _raw_spin_lock_irqsave+0x1c/0x30
[   87.916758]        obj_cgroup_release+0x4c/0xd0
[   87.921280]        percpu_ref_put_many.constprop.0+0x11c/0x130
[   87.927102]        drain_obj_stock+0x88/0xdc
[   87.931360]        refill_obj_stock+0x8c/0x1e0
[   87.935792]        obj_cgroup_charge+0x100/0x1cc
[   87.940398]        kmem_cache_alloc+0xb8/0x354
[   87.944829]        __sigqueue_alloc+0x164/0x340
[   87.949350]        __send_signal+0x248/0x560
[   87.953610]        send_signal+0x1c0/0x340
[   87.957695]        do_send_specific+0x1ac/0x1d0
[   87.962214]        do_tkill+0x84/0xa0
[   87.965864]        __arm64_sys_tgkill+0x38/0x50
[   87.970383]        invoke_syscall+0x50/0x120
[   87.974642]        el0_svc_common.constprop.0+0x68/0x124
[   87.979941]        do_el0_svc+0x34/0x9c
[   87.983765]        el0_svc+0x5c/0x19c
[   87.987416]        el0t_64_sync_handler+0xa4/0x130
[   87.992196]        el0t_64_sync+0x1a4/0x1a8
[   87.996367]
[   87.996367] other info that might help us debug this:
[   87.996367]
[   88.004356]  Possible unsafe locking scenario:
[   88.004356]
[   88.010263]        CPU0                    CPU1
[   88.014780]        ----                    ----
[   88.019297]   lock(&sighand->siglock);
[   88.023036]                                lock(css_set_lock);
[   88.028858]                                lock(&sighand->siglock);
[   88.035114]   lock(css_set_lock);
[   88.038418]
[   88.038418]  *** DEADLOCK ***
[   88.038418]
[   88.044324] 3 locks held by podman/2371:
[   88.048235]  #0: ffffa7235072d1c8 (rcu_read_lock){....}-{1:2}, at: do_send_specific+0x8/0x1d0
[   88.056756]  #1: ffff577e760d88d8 (&sighand->siglock){....}-{2:2}, at: _raw_spin_lock_irqsave+0x1c/0x30
[   88.066144]  #2: ffffa7235072d1c8 (rcu_read_lock){....}-{1:2}, at: percpu_ref_put_many.constprop.0+0x0/0x130
[   88.075967]
[   88.075967] stack backtrace:
[   88.080312] CPU: 6 PID: 2371 Comm: podman Tainted: G        W         5.17.0-rc2+ torvalds#171
[   88.088217] Hardware name: SolidRun Ltd. SolidRun CEX7 Platform, BIOS EDK II Aug  9 2021
[   88.096294] Call trace:
[   88.098728]  dump_backtrace+0xf8/0x130
[   88.102466]  show_stack+0x24/0x80
[   88.105770]  dump_stack_lvl+0x8c/0xb8
[   88.109423]  dump_stack+0x18/0x34
[   88.112727]  print_circular_bug+0x1f8/0x200
[   88.116899]  check_noncircular+0x104/0x130
[   88.120984]  check_prev_add+0xac/0x68c
[   88.124722]  validate_chain+0x3fc/0x590
[   88.128547]  __lock_acquire+0x444/0x9c0
[   88.132371]  lock_acquire.part.0+0xa8/0x1b0
[   88.136543]  lock_acquire+0x68/0x8c
[   88.140021]  __raw_spin_lock_irqsave+0x8c/0x140
[   88.144541]  _raw_spin_lock_irqsave+0x1c/0x30
[   88.148886]  obj_cgroup_release+0x4c/0xd0
[   88.152886]  percpu_ref_put_many.constprop.0+0x11c/0x130
[   88.158187]  drain_obj_stock+0x88/0xdc
[   88.161924]  refill_obj_stock+0x8c/0x1e0
[   88.165836]  obj_cgroup_charge+0x100/0x1cc
[   88.169920]  kmem_cache_alloc+0xb8/0x354
[   88.173832]  __sigqueue_alloc+0x164/0x340
[   88.177831]  __send_signal+0x248/0x560
[   88.181569]  send_signal+0x1c0/0x340

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
chao-p pushed a commit to chao-p/linux that referenced this pull request May 19, 2022
Without this patch, lockdep complains as follows and disable it.
 =============================
 [ BUG: Invalid wait context ]
 5.18.0-rc1 torvalds#171 Not tainted
 -----------------------------
 swapper/0/1 is trying to lock:
 ffffffff978f7978 (&port_lock_key){....}-{3:3}, at: serial8250_console_write+0x557/0x610
 other info that might help us debug this:
 context-{5:5}
 3 locks held by swapper/0/1:
  #0: ffffffff95a9ab48 (rcu_tasks.cbs_gbl_lock){....}-{2:2}, at: cblist_init_generic+0x29/0x310
  #1: ffffffff95a86d60 (console_lock){+.+.}-{0:0}, at: vprintk_emit+0x153/0x200
  #2: ffffffff959a66c0 (console_owner){....}-{0:0}, at: console_unlock+0x27a/0x620
 stack backtrace:
 CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.18.0-rc1-yamahata-kvm-upstream+ torvalds#171 eb656e2c6a2533f980e80fcf0fe9314dd3ea2a22
 Hardware name: Intel Corporation EAGLESTREAM/EAGLESTREAM, BIOS EGSDCRB1.SYS.0066.D24.2110072326 10/07/2021
 Call Trace:
  <TASK>
  show_stack+0x52/0x58
  dump_stack_lvl+0x5b/0x82
  dump_stack+0x10/0x12
  check_wait_context.cold+0xc0/0xfe
  __lock_acquire+0x222/0x990
  lock_acquire.part.0+0x126/0x2f0
  ? serial8250_console_write+0x557/0x610
  ? rcu_read_unlock+0x50/0x50
  ? check_prev_add+0x1270/0x1270
  ? __this_cpu_preempt_check+0x13/0x20
  lock_acquire+0x8f/0x180
  ? serial8250_console_write+0x557/0x610
  _raw_spin_lock_irqsave+0x43/0x60
  ? serial8250_console_write+0x557/0x610
  serial8250_console_write+0x557/0x610
  ? serial8250_config_port+0x210/0x210
  ? rcu_read_unlock+0x50/0x50
  ? __lock_release+0x14d/0x2d0
  ? record_print_text+0x206/0x260
  ? console_unlock+0x2a5/0x620
  ? __this_cpu_preempt_check+0x13/0x20
  univ8250_console_write+0x4b/0x60
  call_console_drivers.constprop.0+0x180/0x250
  console_unlock+0x2d0/0x620
  ? console_unlock+0x27a/0x620
  ? devkmsg_read+0x420/0x420
  ? __down_trylock_console_sem+0x7c/0xc0
  ? vprintk_emit+0x153/0x200
  vprintk_emit+0x1a4/0x200
  vprintk_default+0x1d/0x20
  vprintk+0x4e/0x60
  _printk+0xb2/0xe3
  ? record_print_text.cold+0x11/0x11
  ? rwlock_bug.part.0+0x60/0x60
  ? lock_acquire+0x8f/0x180
  ? cblist_init_generic+0x29/0x310
  ? do_raw_spin_lock+0x11e/0x1b0
  ? do_raw_spin_lock+0x109/0x1b0
  cblist_init_generic.cold+0x44/0x52
  rcu_init_tasks_generic+0x15/0x164
  kernel_init_freeable+0x103/0x1ba
  ? rest_init+0x340/0x340
  kernel_init+0x1f/0x170
  ? rest_init+0x340/0x340
  ret_from_fork+0x1f/0x30
  </TASK>

Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
chao-p pushed a commit to chao-p/linux that referenced this pull request Dec 2, 2022
Without this patch, lockdep complains as follows and disable it.
 =============================
 [ BUG: Invalid wait context ]
 5.18.0-rc1 torvalds#171 Not tainted
 -----------------------------
 swapper/0/1 is trying to lock:
 ffffffff978f7978 (&port_lock_key){....}-{3:3}, at: serial8250_console_write+0x557/0x610
 other info that might help us debug this:
 context-{5:5}
 3 locks held by swapper/0/1:
  #0: ffffffff95a9ab48 (rcu_tasks.cbs_gbl_lock){....}-{2:2}, at: cblist_init_generic+0x29/0x310
  #1: ffffffff95a86d60 (console_lock){+.+.}-{0:0}, at: vprintk_emit+0x153/0x200
  #2: ffffffff959a66c0 (console_owner){....}-{0:0}, at: console_unlock+0x27a/0x620
 stack backtrace:
 CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.18.0-rc1-yamahata-kvm-upstream+ torvalds#171 eb656e2c6a2533f980e80fcf0fe9314dd3ea2a22
 Hardware name: Intel Corporation EAGLESTREAM/EAGLESTREAM, BIOS EGSDCRB1.SYS.0066.D24.2110072326 10/07/2021
 Call Trace:
  <TASK>
  show_stack+0x52/0x58
  dump_stack_lvl+0x5b/0x82
  dump_stack+0x10/0x12
  check_wait_context.cold+0xc0/0xfe
  __lock_acquire+0x222/0x990
  lock_acquire.part.0+0x126/0x2f0
  ? serial8250_console_write+0x557/0x610
  ? rcu_read_unlock+0x50/0x50
  ? check_prev_add+0x1270/0x1270
  ? __this_cpu_preempt_check+0x13/0x20
  lock_acquire+0x8f/0x180
  ? serial8250_console_write+0x557/0x610
  _raw_spin_lock_irqsave+0x43/0x60
  ? serial8250_console_write+0x557/0x610
  serial8250_console_write+0x557/0x610
  ? serial8250_config_port+0x210/0x210
  ? rcu_read_unlock+0x50/0x50
  ? __lock_release+0x14d/0x2d0
  ? record_print_text+0x206/0x260
  ? console_unlock+0x2a5/0x620
  ? __this_cpu_preempt_check+0x13/0x20
  univ8250_console_write+0x4b/0x60
  call_console_drivers.constprop.0+0x180/0x250
  console_unlock+0x2d0/0x620
  ? console_unlock+0x27a/0x620
  ? devkmsg_read+0x420/0x420
  ? __down_trylock_console_sem+0x7c/0xc0
  ? vprintk_emit+0x153/0x200
  vprintk_emit+0x1a4/0x200
  vprintk_default+0x1d/0x20
  vprintk+0x4e/0x60
  _printk+0xb2/0xe3
  ? record_print_text.cold+0x11/0x11
  ? rwlock_bug.part.0+0x60/0x60
  ? lock_acquire+0x8f/0x180
  ? cblist_init_generic+0x29/0x310
  ? do_raw_spin_lock+0x11e/0x1b0
  ? do_raw_spin_lock+0x109/0x1b0
  cblist_init_generic.cold+0x44/0x52
  rcu_init_tasks_generic+0x15/0x164
  kernel_init_freeable+0x103/0x1ba
  ? rest_init+0x340/0x340
  kernel_init+0x1f/0x170
  ? rest_init+0x340/0x340
  ret_from_fork+0x1f/0x30
  </TASK>

Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Dec 13, 2022
…g used

This patch fixes a slab-out-of-bounds read in pn533 that occurs in
nla_put() called from nfc_genl_send_target() when target->sensb_res_len,
which is duplicated from nfc_target in pn533_poll_dep_complete(), is
too large as the nfc_target is not properly initialized and retains
garbage values. The patch clears the nfc_target before it is used.

Found by a modified version of syzkaller.

==================================================================
BUG: KASAN: slab-out-of-bounds in nla_put+0xe0/0x120
Read of size 94 at addr ffff888109d1dfa0 by task syz-executor/4367

CPU: 0 PID: 4367 Comm: syz-executor Not tainted 5.14.0+ torvalds#171
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014
Call Trace:
 dump_stack_lvl+0x8e/0xd1
 print_address_description.constprop.0.cold+0x93/0x334
 kasan_report.cold+0x83/0xdf
 kasan_check_range+0x14e/0x1b0
 memcpy+0x20/0x60
 nla_put+0xe0/0x120
 nfc_genl_dump_targets+0x74f/0xb20
 genl_lock_dumpit+0x65/0x90
 netlink_dump+0x4b0/0xa40
 __netlink_dump_start+0x5dc/0x8c0
 genl_family_rcv_msg_dumpit.isra.0+0x2a1/0x300
 genl_rcv_msg+0x3c8/0x4f0
 netlink_rcv_skb+0x130/0x3b0
 genl_rcv+0x29/0x40
 netlink_unicast+0x4a1/0x6a0
 netlink_sendmsg+0x788/0xc90
 sock_sendmsg+0xca/0x110
 ____sys_sendmsg+0x63f/0x780
 ___sys_sendmsg+0xfb/0x170
 __sys_sendmsg+0xd8/0x190
 do_syscall_64+0x35/0x80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x46b55d
Code: 02 b8 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f167a757c48 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000686b60 RCX: 000000000046b55d
RDX: 0000000000000000 RSI: 000000004004fb80 RDI: 0000000000000009
RBP: 00000000004d9ba0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000686b60
R13: 0000000000686b68 R14: 00007ffd2f2facc0 R15: 00007f167a757dc0

Allocated by task 0:
(stack is not available)

The buggy address belongs to the object at ffff888109d1df80
 which belongs to the cache kmalloc-96 of size 96
The buggy address is located 32 bytes inside of
 96-byte region [ffff888109d1df80, ffff888109d1dfe0)
The buggy address belongs to the page:
page:ffffea0004274740 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x109d1d
flags: 0x200000000000200(slab|node=0|zone=2)
raw: 0200000000000200 0000000000000000 dead000000000122 ffff888100041780
raw: 0000000000000000 0000000080200020 00000001ffffffff 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12c40(GFP_NOFS|__GFP_NOWARN|__GFP_NORETRY), pid 4366, ts 19572546791, free_ts 19568585127
 prep_new_page+0x1aa/0x240
 get_page_from_freelist+0x159a/0x27c0
 __alloc_pages+0x2da/0x6a0
 alloc_pages+0xec/0x1e0
 allocate_slab+0x380/0x4e0
 ___slab_alloc+0x5bc/0x940
 __slab_alloc+0x6d/0x80
 __kmalloc+0x329/0x390
 tomoyo_supervisor+0xb7f/0xd10
 tomoyo_path_permission+0x26a/0x3a0
 tomoyo_check_open_permission+0x2b0/0x310
 tomoyo_file_open+0x99/0xc0
 security_file_open+0x57/0x470
 do_dentry_open+0x318/0xfe0
 path_openat+0x1852/0x2310
 do_filp_open+0x1c6/0x290
page last free stack trace:
 free_pcp_prepare+0x3d3/0x7f0
 free_unref_page+0x1e/0x3d0
 unfreeze_partials.isra.0+0x211/0x2f0
 put_cpu_partial+0x66/0x160
 qlist_free_all+0x5a/0xc0
 kasan_quarantine_reduce+0x13d/0x180
 __kasan_slab_alloc+0x73/0x80
 slab_post_alloc_hook+0x4d/0x490
 __kmalloc+0x180/0x390
 tomoyo_supervisor+0xb7f/0xd10
 tomoyo_path_permission+0x26a/0x3a0
 tomoyo_path_perm+0x2c1/0x3c0
 security_inode_getattr+0xc2/0x130
 vfs_getattr+0x27/0x60
 vfs_fstat+0x3e/0x80
 __do_sys_newfstat+0x7d/0xf0

Memory state around the buggy address:
 ffff888109d1de80: fa fb fb fb fb fb fb fb fb fb fb fb fc fc fc fc
 ffff888109d1df00: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc
>ffff888109d1df80: 00 00 00 00 00 00 00 00 00 00 00 00 fc fc fc fc
                                                       ^
 ffff888109d1e000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffff888109d1e080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
==================================================================

Fixes: 673088f ("NFC: pn533: Send ATR_REQ directly for active device detection")
Reported-by: Dokyung Song <dokyungs@yonsei.ac.kr>
Reported-by: Jisoo Jang <jisoo.jang@yonsei.ac.kr>
Reported-by: Minsuk Kang <linuxlovemin@yonsei.ac.kr>
Signed-off-by: Minsuk Kang <linuxlovemin@yonsei.ac.kr>
chao-p pushed a commit to chao-p/linux that referenced this pull request Jan 19, 2023
Without this patch, lockdep complains as follows and disable it.
 =============================
 [ BUG: Invalid wait context ]
 5.18.0-rc1 torvalds#171 Not tainted
 -----------------------------
 swapper/0/1 is trying to lock:
 ffffffff978f7978 (&port_lock_key){....}-{3:3}, at: serial8250_console_write+0x557/0x610
 other info that might help us debug this:
 context-{5:5}
 3 locks held by swapper/0/1:
  #0: ffffffff95a9ab48 (rcu_tasks.cbs_gbl_lock){....}-{2:2}, at: cblist_init_generic+0x29/0x310
  #1: ffffffff95a86d60 (console_lock){+.+.}-{0:0}, at: vprintk_emit+0x153/0x200
  #2: ffffffff959a66c0 (console_owner){....}-{0:0}, at: console_unlock+0x27a/0x620
 stack backtrace:
 CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.18.0-rc1-yamahata-kvm-upstream+ torvalds#171 eb656e2c6a2533f980e80fcf0fe9314dd3ea2a22
 Hardware name: Intel Corporation EAGLESTREAM/EAGLESTREAM, BIOS EGSDCRB1.SYS.0066.D24.2110072326 10/07/2021
 Call Trace:
  <TASK>
  show_stack+0x52/0x58
  dump_stack_lvl+0x5b/0x82
  dump_stack+0x10/0x12
  check_wait_context.cold+0xc0/0xfe
  __lock_acquire+0x222/0x990
  lock_acquire.part.0+0x126/0x2f0
  ? serial8250_console_write+0x557/0x610
  ? rcu_read_unlock+0x50/0x50
  ? check_prev_add+0x1270/0x1270
  ? __this_cpu_preempt_check+0x13/0x20
  lock_acquire+0x8f/0x180
  ? serial8250_console_write+0x557/0x610
  _raw_spin_lock_irqsave+0x43/0x60
  ? serial8250_console_write+0x557/0x610
  serial8250_console_write+0x557/0x610
  ? serial8250_config_port+0x210/0x210
  ? rcu_read_unlock+0x50/0x50
  ? __lock_release+0x14d/0x2d0
  ? record_print_text+0x206/0x260
  ? console_unlock+0x2a5/0x620
  ? __this_cpu_preempt_check+0x13/0x20
  univ8250_console_write+0x4b/0x60
  call_console_drivers.constprop.0+0x180/0x250
  console_unlock+0x2d0/0x620
  ? console_unlock+0x27a/0x620
  ? devkmsg_read+0x420/0x420
  ? __down_trylock_console_sem+0x7c/0xc0
  ? vprintk_emit+0x153/0x200
  vprintk_emit+0x1a4/0x200
  vprintk_default+0x1d/0x20
  vprintk+0x4e/0x60
  _printk+0xb2/0xe3
  ? record_print_text.cold+0x11/0x11
  ? rwlock_bug.part.0+0x60/0x60
  ? lock_acquire+0x8f/0x180
  ? cblist_init_generic+0x29/0x310
  ? do_raw_spin_lock+0x11e/0x1b0
  ? do_raw_spin_lock+0x109/0x1b0
  cblist_init_generic.cold+0x44/0x52
  rcu_init_tasks_generic+0x15/0x164
  kernel_init_freeable+0x103/0x1ba
  ? rest_init+0x340/0x340
  kernel_init+0x1f/0x170
  ? rest_init+0x340/0x340
  ret_from_fork+0x1f/0x30
  </TASK>

Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
fidencio pushed a commit to kata-containers/linux that referenced this pull request Jan 23, 2023
Without this patch, lockdep complains as follows and disable it.
 =============================
 [ BUG: Invalid wait context ]
 5.18.0-rc1 torvalds#171 Not tainted
 -----------------------------
 swapper/0/1 is trying to lock:
 ffffffff978f7978 (&port_lock_key){....}-{3:3}, at: serial8250_console_write+0x557/0x610
 other info that might help us debug this:
 context-{5:5}
 3 locks held by swapper/0/1:
  #0: ffffffff95a9ab48 (rcu_tasks.cbs_gbl_lock){....}-{2:2}, at: cblist_init_generic+0x29/0x310
  #1: ffffffff95a86d60 (console_lock){+.+.}-{0:0}, at: vprintk_emit+0x153/0x200
  #2: ffffffff959a66c0 (console_owner){....}-{0:0}, at: console_unlock+0x27a/0x620
 stack backtrace:
 CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.18.0-rc1-yamahata-kvm-upstream+ torvalds#171 eb656e2c6a2533f980e80fcf0fe9314dd3ea2a22
 Hardware name: Intel Corporation EAGLESTREAM/EAGLESTREAM, BIOS EGSDCRB1.SYS.0066.D24.2110072326 10/07/2021
 Call Trace:
  <TASK>
  show_stack+0x52/0x58
  dump_stack_lvl+0x5b/0x82
  dump_stack+0x10/0x12
  check_wait_context.cold+0xc0/0xfe
  __lock_acquire+0x222/0x990
  lock_acquire.part.0+0x126/0x2f0
  ? serial8250_console_write+0x557/0x610
  ? rcu_read_unlock+0x50/0x50
  ? check_prev_add+0x1270/0x1270
  ? __this_cpu_preempt_check+0x13/0x20
  lock_acquire+0x8f/0x180
  ? serial8250_console_write+0x557/0x610
  _raw_spin_lock_irqsave+0x43/0x60
  ? serial8250_console_write+0x557/0x610
  serial8250_console_write+0x557/0x610
  ? serial8250_config_port+0x210/0x210
  ? rcu_read_unlock+0x50/0x50
  ? __lock_release+0x14d/0x2d0
  ? record_print_text+0x206/0x260
  ? console_unlock+0x2a5/0x620
  ? __this_cpu_preempt_check+0x13/0x20
  univ8250_console_write+0x4b/0x60
  call_console_drivers.constprop.0+0x180/0x250
  console_unlock+0x2d0/0x620
  ? console_unlock+0x27a/0x620
  ? devkmsg_read+0x420/0x420
  ? __down_trylock_console_sem+0x7c/0xc0
  ? vprintk_emit+0x153/0x200
  vprintk_emit+0x1a4/0x200
  vprintk_default+0x1d/0x20
  vprintk+0x4e/0x60
  _printk+0xb2/0xe3
  ? record_print_text.cold+0x11/0x11
  ? rwlock_bug.part.0+0x60/0x60
  ? lock_acquire+0x8f/0x180
  ? cblist_init_generic+0x29/0x310
  ? do_raw_spin_lock+0x11e/0x1b0
  ? do_raw_spin_lock+0x109/0x1b0
  cblist_init_generic.cold+0x44/0x52
  rcu_init_tasks_generic+0x15/0x164
  kernel_init_freeable+0x103/0x1ba
  ? rest_init+0x340/0x340
  kernel_init+0x1f/0x170
  ? rest_init+0x340/0x340
  ret_from_fork+0x1f/0x30
  </TASK>

Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
yamahata added a commit to yamahata/linux that referenced this pull request Feb 8, 2023
Without this patch, lockdep complains as follows and disable it.
 =============================
 [ BUG: Invalid wait context ]
 5.18.0-rc1 torvalds#171 Not tainted
 -----------------------------
 swapper/0/1 is trying to lock:
 ffffffff978f7978 (&port_lock_key){....}-{3:3}, at: serial8250_console_write+0x557/0x610
 other info that might help us debug this:
 context-{5:5}
 3 locks held by swapper/0/1:
  #0: ffffffff95a9ab48 (rcu_tasks.cbs_gbl_lock){....}-{2:2}, at: cblist_init_generic+0x29/0x310
  #1: ffffffff95a86d60 (console_lock){+.+.}-{0:0}, at: vprintk_emit+0x153/0x200
  #2: ffffffff959a66c0 (console_owner){....}-{0:0}, at: console_unlock+0x27a/0x620
 stack backtrace:
 CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.18.0-rc1-yamahata-kvm-upstream+ torvalds#171 eb656e2c6a2533f980e80fcf0fe9314dd3ea2a22
 Hardware name: Intel Corporation EAGLESTREAM/EAGLESTREAM, BIOS EGSDCRB1.SYS.0066.D24.2110072326 10/07/2021
 Call Trace:
  <TASK>
  show_stack+0x52/0x58
  dump_stack_lvl+0x5b/0x82
  dump_stack+0x10/0x12
  check_wait_context.cold+0xc0/0xfe
  __lock_acquire+0x222/0x990
  lock_acquire.part.0+0x126/0x2f0
  ? serial8250_console_write+0x557/0x610
  ? rcu_read_unlock+0x50/0x50
  ? check_prev_add+0x1270/0x1270
  ? __this_cpu_preempt_check+0x13/0x20
  lock_acquire+0x8f/0x180
  ? serial8250_console_write+0x557/0x610
  _raw_spin_lock_irqsave+0x43/0x60
  ? serial8250_console_write+0x557/0x610
  serial8250_console_write+0x557/0x610
  ? serial8250_config_port+0x210/0x210
  ? rcu_read_unlock+0x50/0x50
  ? __lock_release+0x14d/0x2d0
  ? record_print_text+0x206/0x260
  ? console_unlock+0x2a5/0x620
  ? __this_cpu_preempt_check+0x13/0x20
  univ8250_console_write+0x4b/0x60
  call_console_drivers.constprop.0+0x180/0x250
  console_unlock+0x2d0/0x620
  ? console_unlock+0x27a/0x620
  ? devkmsg_read+0x420/0x420
  ? __down_trylock_console_sem+0x7c/0xc0
  ? vprintk_emit+0x153/0x200
  vprintk_emit+0x1a4/0x200
  vprintk_default+0x1d/0x20
  vprintk+0x4e/0x60
  _printk+0xb2/0xe3
  ? record_print_text.cold+0x11/0x11
  ? rwlock_bug.part.0+0x60/0x60
  ? lock_acquire+0x8f/0x180
  ? cblist_init_generic+0x29/0x310
  ? do_raw_spin_lock+0x11e/0x1b0
  ? do_raw_spin_lock+0x109/0x1b0
  cblist_init_generic.cold+0x44/0x52
  rcu_init_tasks_generic+0x15/0x164
  kernel_init_freeable+0x103/0x1ba
  ? rest_init+0x340/0x340
  kernel_init+0x1f/0x170
  ? rest_init+0x340/0x340
  ret_from_fork+0x1f/0x30
  </TASK>

Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
yamahata added a commit to yamahata/linux that referenced this pull request Feb 9, 2023
Without this patch, lockdep complains as follows and disable it.
 =============================
 [ BUG: Invalid wait context ]
 5.18.0-rc1 torvalds#171 Not tainted
 -----------------------------
 swapper/0/1 is trying to lock:
 ffffffff978f7978 (&port_lock_key){....}-{3:3}, at: serial8250_console_write+0x557/0x610
 other info that might help us debug this:
 context-{5:5}
 3 locks held by swapper/0/1:
  #0: ffffffff95a9ab48 (rcu_tasks.cbs_gbl_lock){....}-{2:2}, at: cblist_init_generic+0x29/0x310
  #1: ffffffff95a86d60 (console_lock){+.+.}-{0:0}, at: vprintk_emit+0x153/0x200
  #2: ffffffff959a66c0 (console_owner){....}-{0:0}, at: console_unlock+0x27a/0x620
 stack backtrace:
 CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.18.0-rc1-yamahata-kvm-upstream+ torvalds#171 eb656e2c6a2533f980e80fcf0fe9314dd3ea2a22
 Hardware name: Intel Corporation EAGLESTREAM/EAGLESTREAM, BIOS EGSDCRB1.SYS.0066.D24.2110072326 10/07/2021
 Call Trace:
  <TASK>
  show_stack+0x52/0x58
  dump_stack_lvl+0x5b/0x82
  dump_stack+0x10/0x12
  check_wait_context.cold+0xc0/0xfe
  __lock_acquire+0x222/0x990
  lock_acquire.part.0+0x126/0x2f0
  ? serial8250_console_write+0x557/0x610
  ? rcu_read_unlock+0x50/0x50
  ? check_prev_add+0x1270/0x1270
  ? __this_cpu_preempt_check+0x13/0x20
  lock_acquire+0x8f/0x180
  ? serial8250_console_write+0x557/0x610
  _raw_spin_lock_irqsave+0x43/0x60
  ? serial8250_console_write+0x557/0x610
  serial8250_console_write+0x557/0x610
  ? serial8250_config_port+0x210/0x210
  ? rcu_read_unlock+0x50/0x50
  ? __lock_release+0x14d/0x2d0
  ? record_print_text+0x206/0x260
  ? console_unlock+0x2a5/0x620
  ? __this_cpu_preempt_check+0x13/0x20
  univ8250_console_write+0x4b/0x60
  call_console_drivers.constprop.0+0x180/0x250
  console_unlock+0x2d0/0x620
  ? console_unlock+0x27a/0x620
  ? devkmsg_read+0x420/0x420
  ? __down_trylock_console_sem+0x7c/0xc0
  ? vprintk_emit+0x153/0x200
  vprintk_emit+0x1a4/0x200
  vprintk_default+0x1d/0x20
  vprintk+0x4e/0x60
  _printk+0xb2/0xe3
  ? record_print_text.cold+0x11/0x11
  ? rwlock_bug.part.0+0x60/0x60
  ? lock_acquire+0x8f/0x180
  ? cblist_init_generic+0x29/0x310
  ? do_raw_spin_lock+0x11e/0x1b0
  ? do_raw_spin_lock+0x109/0x1b0
  cblist_init_generic.cold+0x44/0x52
  rcu_init_tasks_generic+0x15/0x164
  kernel_init_freeable+0x103/0x1ba
  ? rest_init+0x340/0x340
  kernel_init+0x1f/0x170
  ? rest_init+0x340/0x340
  ret_from_fork+0x1f/0x30
  </TASK>

Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
yamahata added a commit to yamahata/linux that referenced this pull request Feb 9, 2023
Without this patch, lockdep complains as follows and disable it.
 =============================
 [ BUG: Invalid wait context ]
 5.18.0-rc1 torvalds#171 Not tainted
 -----------------------------
 swapper/0/1 is trying to lock:
 ffffffff978f7978 (&port_lock_key){....}-{3:3}, at: serial8250_console_write+0x557/0x610
 other info that might help us debug this:
 context-{5:5}
 3 locks held by swapper/0/1:
  #0: ffffffff95a9ab48 (rcu_tasks.cbs_gbl_lock){....}-{2:2}, at: cblist_init_generic+0x29/0x310
  #1: ffffffff95a86d60 (console_lock){+.+.}-{0:0}, at: vprintk_emit+0x153/0x200
  #2: ffffffff959a66c0 (console_owner){....}-{0:0}, at: console_unlock+0x27a/0x620
 stack backtrace:
 CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.18.0-rc1-yamahata-kvm-upstream+ torvalds#171 eb656e2c6a2533f980e80fcf0fe9314dd3ea2a22
 Hardware name: Intel Corporation EAGLESTREAM/EAGLESTREAM, BIOS EGSDCRB1.SYS.0066.D24.2110072326 10/07/2021
 Call Trace:
  <TASK>
  show_stack+0x52/0x58
  dump_stack_lvl+0x5b/0x82
  dump_stack+0x10/0x12
  check_wait_context.cold+0xc0/0xfe
  __lock_acquire+0x222/0x990
  lock_acquire.part.0+0x126/0x2f0
  ? serial8250_console_write+0x557/0x610
  ? rcu_read_unlock+0x50/0x50
  ? check_prev_add+0x1270/0x1270
  ? __this_cpu_preempt_check+0x13/0x20
  lock_acquire+0x8f/0x180
  ? serial8250_console_write+0x557/0x610
  _raw_spin_lock_irqsave+0x43/0x60
  ? serial8250_console_write+0x557/0x610
  serial8250_console_write+0x557/0x610
  ? serial8250_config_port+0x210/0x210
  ? rcu_read_unlock+0x50/0x50
  ? __lock_release+0x14d/0x2d0
  ? record_print_text+0x206/0x260
  ? console_unlock+0x2a5/0x620
  ? __this_cpu_preempt_check+0x13/0x20
  univ8250_console_write+0x4b/0x60
  call_console_drivers.constprop.0+0x180/0x250
  console_unlock+0x2d0/0x620
  ? console_unlock+0x27a/0x620
  ? devkmsg_read+0x420/0x420
  ? __down_trylock_console_sem+0x7c/0xc0
  ? vprintk_emit+0x153/0x200
  vprintk_emit+0x1a4/0x200
  vprintk_default+0x1d/0x20
  vprintk+0x4e/0x60
  _printk+0xb2/0xe3
  ? record_print_text.cold+0x11/0x11
  ? rwlock_bug.part.0+0x60/0x60
  ? lock_acquire+0x8f/0x180
  ? cblist_init_generic+0x29/0x310
  ? do_raw_spin_lock+0x11e/0x1b0
  ? do_raw_spin_lock+0x109/0x1b0
  cblist_init_generic.cold+0x44/0x52
  rcu_init_tasks_generic+0x15/0x164
  kernel_init_freeable+0x103/0x1ba
  ? rest_init+0x340/0x340
  kernel_init+0x1f/0x170
  ? rest_init+0x340/0x340
  ret_from_fork+0x1f/0x30
  </TASK>

Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
fidencio pushed a commit to kata-containers/linux that referenced this pull request Feb 23, 2023
Without this patch, lockdep complains as follows and disable it.
 =============================
 [ BUG: Invalid wait context ]
 5.18.0-rc1 torvalds#171 Not tainted
 -----------------------------
 swapper/0/1 is trying to lock:
 ffffffff978f7978 (&port_lock_key){....}-{3:3}, at: serial8250_console_write+0x557/0x610
 other info that might help us debug this:
 context-{5:5}
 3 locks held by swapper/0/1:
  #0: ffffffff95a9ab48 (rcu_tasks.cbs_gbl_lock){....}-{2:2}, at: cblist_init_generic+0x29/0x310
  #1: ffffffff95a86d60 (console_lock){+.+.}-{0:0}, at: vprintk_emit+0x153/0x200
  #2: ffffffff959a66c0 (console_owner){....}-{0:0}, at: console_unlock+0x27a/0x620
 stack backtrace:
 CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.18.0-rc1-yamahata-kvm-upstream+ torvalds#171 eb656e2c6a2533f980e80fcf0fe9314dd3ea2a22
 Hardware name: Intel Corporation EAGLESTREAM/EAGLESTREAM, BIOS EGSDCRB1.SYS.0066.D24.2110072326 10/07/2021
 Call Trace:
  <TASK>
  show_stack+0x52/0x58
  dump_stack_lvl+0x5b/0x82
  dump_stack+0x10/0x12
  check_wait_context.cold+0xc0/0xfe
  __lock_acquire+0x222/0x990
  lock_acquire.part.0+0x126/0x2f0
  ? serial8250_console_write+0x557/0x610
  ? rcu_read_unlock+0x50/0x50
  ? check_prev_add+0x1270/0x1270
  ? __this_cpu_preempt_check+0x13/0x20
  lock_acquire+0x8f/0x180
  ? serial8250_console_write+0x557/0x610
  _raw_spin_lock_irqsave+0x43/0x60
  ? serial8250_console_write+0x557/0x610
  serial8250_console_write+0x557/0x610
  ? serial8250_config_port+0x210/0x210
  ? rcu_read_unlock+0x50/0x50
  ? __lock_release+0x14d/0x2d0
  ? record_print_text+0x206/0x260
  ? console_unlock+0x2a5/0x620
  ? __this_cpu_preempt_check+0x13/0x20
  univ8250_console_write+0x4b/0x60
  call_console_drivers.constprop.0+0x180/0x250
  console_unlock+0x2d0/0x620
  ? console_unlock+0x27a/0x620
  ? devkmsg_read+0x420/0x420
  ? __down_trylock_console_sem+0x7c/0xc0
  ? vprintk_emit+0x153/0x200
  vprintk_emit+0x1a4/0x200
  vprintk_default+0x1d/0x20
  vprintk+0x4e/0x60
  _printk+0xb2/0xe3
  ? record_print_text.cold+0x11/0x11
  ? rwlock_bug.part.0+0x60/0x60
  ? lock_acquire+0x8f/0x180
  ? cblist_init_generic+0x29/0x310
  ? do_raw_spin_lock+0x11e/0x1b0
  ? do_raw_spin_lock+0x109/0x1b0
  cblist_init_generic.cold+0x44/0x52
  rcu_init_tasks_generic+0x15/0x164
  kernel_init_freeable+0x103/0x1ba
  ? rest_init+0x340/0x340
  kernel_init+0x1f/0x170
  ? rest_init+0x340/0x340
  ret_from_fork+0x1f/0x30
  </TASK>

Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Dec 7, 2023
Currently, there are two test cases with same name
"ALU64_SMOD_X: -7 % 2 = -1", the first one is right,
the second one should be ALU64_SMOD_K because its
code is BPF_ALU64 | BPF_MOD | BPF_K.

Before:
test_bpf: torvalds#170 ALU64_SMOD_X: -7 % 2 = -1 jited:1 4 PASS
test_bpf: torvalds#171 ALU64_SMOD_X: -7 % 2 = -1 jited:1 4 PASS

After:
test_bpf: torvalds#170 ALU64_SMOD_X: -7 % 2 = -1 jited:1 4 PASS
test_bpf: torvalds#171 ALU64_SMOD_K: -7 % 2 = -1 jited:1 4 PASS

Fixes: daabb2b ("bpf/tests: add tests for cpuv4 instructions")
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Dec 7, 2023
Currently, there are two test cases with same name
"ALU64_SMOD_X: -7 % 2 = -1", the first one is right,
the second one should be ALU64_SMOD_K because its
code is BPF_ALU64 | BPF_MOD | BPF_K.

Before:
test_bpf: torvalds#170 ALU64_SMOD_X: -7 % 2 = -1 jited:1 4 PASS
test_bpf: torvalds#171 ALU64_SMOD_X: -7 % 2 = -1 jited:1 4 PASS

After:
test_bpf: torvalds#170 ALU64_SMOD_X: -7 % 2 = -1 jited:1 4 PASS
test_bpf: torvalds#171 ALU64_SMOD_K: -7 % 2 = -1 jited:1 4 PASS

Fixes: daabb2b ("bpf/tests: add tests for cpuv4 instructions")
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request Dec 10, 2023
Currently, there are two test cases with same name
"ALU64_SMOD_X: -7 % 2 = -1", the first one is right,
the second one should be ALU64_SMOD_K because its
code is BPF_ALU64 | BPF_MOD | BPF_K.

Before:
test_bpf: torvalds#170 ALU64_SMOD_X: -7 % 2 = -1 jited:1 4 PASS
test_bpf: torvalds#171 ALU64_SMOD_X: -7 % 2 = -1 jited:1 4 PASS

After:
test_bpf: torvalds#170 ALU64_SMOD_X: -7 % 2 = -1 jited:1 4 PASS
test_bpf: torvalds#171 ALU64_SMOD_K: -7 % 2 = -1 jited:1 4 PASS

Fixes: daabb2b ("bpf/tests: add tests for cpuv4 instructions")
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20231207040851.19730-1-yangtiezhu@loongson.cn
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
anakryiko pushed a commit to anakryiko/linux that referenced this pull request Dec 19, 2023
Currently, there are two test cases with same name
"ALU64_SMOD_X: -7 % 2 = -1", the first one is right,
the second one should be ALU64_SMOD_K because its
code is BPF_ALU64 | BPF_MOD | BPF_K.

Before:
test_bpf: torvalds#170 ALU64_SMOD_X: -7 % 2 = -1 jited:1 4 PASS
test_bpf: torvalds#171 ALU64_SMOD_X: -7 % 2 = -1 jited:1 4 PASS

After:
test_bpf: torvalds#170 ALU64_SMOD_X: -7 % 2 = -1 jited:1 4 PASS
test_bpf: torvalds#171 ALU64_SMOD_K: -7 % 2 = -1 jited:1 4 PASS

Fixes: daabb2b ("bpf/tests: add tests for cpuv4 instructions")
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20231207040851.19730-1-yangtiezhu@loongson.cn
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
intersectRaven pushed a commit to intersectRaven/linux that referenced this pull request Jan 26, 2024
[ Upstream commit 5181dc0 ]

Currently, there are two test cases with same name
"ALU64_SMOD_X: -7 % 2 = -1", the first one is right,
the second one should be ALU64_SMOD_K because its
code is BPF_ALU64 | BPF_MOD | BPF_K.

Before:
test_bpf: torvalds#170 ALU64_SMOD_X: -7 % 2 = -1 jited:1 4 PASS
test_bpf: torvalds#171 ALU64_SMOD_X: -7 % 2 = -1 jited:1 4 PASS

After:
test_bpf: torvalds#170 ALU64_SMOD_X: -7 % 2 = -1 jited:1 4 PASS
test_bpf: torvalds#171 ALU64_SMOD_K: -7 % 2 = -1 jited:1 4 PASS

Fixes: daabb2b ("bpf/tests: add tests for cpuv4 instructions")
Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Acked-by: Yonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20231207040851.19730-1-yangtiezhu@loongson.cn
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request May 6, 2024
According to comments in drivers/pmdomain/imx/gpcv2.c:

	/* request the ADB400 to power up */
	if (domain->bits.hskreq) {
		regmap_update_bits(domain->regmap, domain->regs->hsk,
				   domain->bits.hskreq, domain->bits.hskreq);

		/*
		 * ret = regmap_read_poll_timeout(domain->regmap, domain->regs->hsk, reg_val,
		 *				  (reg_val & domain->bits.hskack), 0,
		 *				  USEC_PER_MSEC);
		 * Technically we need the commented code to wait handshake. But that needs
		 * the BLK-CTL module BUS clk-en bit being set.
		 *
		 * There is a separate BLK-CTL module and we will have such a driver for it,
		 * that driver will set the BUS clk-en bit and handshake will be triggered
		 * automatically there. Just add a delay and suppose the handshake finish
		 * after that.
		 */
	}

The BLK-CTL module needs to add delay to wait for a handshake request finished
before accessing registers, which is just after the enabling of the power domain.

Otherwise there is error:

[    2.181035] Kernel panic - not syncing: Asynchronous SError Interrupt
[    2.181038] CPU: 1 PID: 48 Comm: kworker/u16:2 Not tainted 6.9.0-rc5-next-20240424-00003-g21cec88845c6 torvalds#171
[    2.181047] Hardware name: NXP i.MX8MPlus EVK board (DT)
[    2.181050] Workqueue: events_unbound deferred_probe_work_func
[    2.181064] Call trace:
[...]
[    2.181142]  arm64_serror_panic+0x6c/0x78
[    2.181149]  do_serror+0x3c/0x70
[    2.181157]  el1h_64_error_handler+0x30/0x48
[    2.181164]  el1h_64_error+0x64/0x68
[    2.181171]  clk_imx8mp_audiomix_runtime_resume+0x34/0x44
[    2.181183]  __genpd_runtime_resume+0x30/0x80
[    2.181195]  genpd_runtime_resume+0x110/0x244
[    2.181205]  __rpm_callback+0x48/0x1d8
[    2.181213]  rpm_callback+0x68/0x74
[    2.181224]  rpm_resume+0x468/0x6c0
[    2.181234]  __pm_runtime_resume+0x50/0x94
[    2.181243]  pm_runtime_get_suppliers+0x60/0x8c
[    2.181258]  __driver_probe_device+0x48/0x12c
[    2.181268]  driver_probe_device+0xd8/0x15c
[    2.181278]  __device_attach_driver+0xb8/0x134
[    2.181290]  bus_for_each_drv+0x84/0xe0
[    2.181302]  __device_attach+0x9c/0x188
[    2.181312]  device_initial_probe+0x14/0x20
[    2.181323]  bus_probe_device+0xac/0xb0
[    2.181334]  deferred_probe_work_func+0x88/0xc0
[    2.181344]  process_one_work+0x150/0x290
[    2.181357]  worker_thread+0x2f8/0x408
[    2.181370]  kthread+0x110/0x114
[    2.181381]  ret_from_fork+0x10/0x20
[    2.181391] SMP: stopping secondary CPUs

Fixes: 1496dd4 ("clk: imx: imx8mp: Add pm_runtime support for power saving")
Reported-by: Francesco Dolcini <francesco@dolcini.it>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Revewied-by: Peng Fan <peng.fan@nxp.com>
intel-lab-lkp pushed a commit to intel-lab-lkp/linux that referenced this pull request May 11, 2024
AudioMix BLK-CTRL on i.MX8MP encountered an accessing register issue
after power up.

[    2.181035] Kernel panic - not syncing: Asynchronous SError Interrupt
[    2.181038] CPU: 1 PID: 48 Comm: kworker/u16:2 Not tainted 6.9.0-rc5-next-20240424-00003-g21cec88845c6 torvalds#171
[    2.181047] Hardware name: NXP i.MX8MPlus EVK board (DT)
[    2.181050] Workqueue: events_unbound deferred_probe_work_func
[    2.181064] Call trace:
[...]
[    2.181142]  arm64_serror_panic+0x6c/0x78
[    2.181149]  do_serror+0x3c/0x70
[    2.181157]  el1h_64_error_handler+0x30/0x48
[    2.181164]  el1h_64_error+0x64/0x68
[    2.181171]  clk_imx8mp_audiomix_runtime_resume+0x34/0x44
[    2.181183]  __genpd_runtime_resume+0x30/0x80
[    2.181195]  genpd_runtime_resume+0x110/0x244
[    2.181205]  __rpm_callback+0x48/0x1d8
[    2.181213]  rpm_callback+0x68/0x74
[    2.181224]  rpm_resume+0x468/0x6c0
[    2.181234]  __pm_runtime_resume+0x50/0x94
[    2.181243]  pm_runtime_get_suppliers+0x60/0x8c
[    2.181258]  __driver_probe_device+0x48/0x12c
[    2.181268]  driver_probe_device+0xd8/0x15c
[    2.181278]  __device_attach_driver+0xb8/0x134
[    2.181290]  bus_for_each_drv+0x84/0xe0
[    2.181302]  __device_attach+0x9c/0x188
[    2.181312]  device_initial_probe+0x14/0x20
[    2.181323]  bus_probe_device+0xac/0xb0
[    2.181334]  deferred_probe_work_func+0x88/0xc0
[    2.181344]  process_one_work+0x150/0x290
[    2.181357]  worker_thread+0x2f8/0x408
[    2.181370]  kthread+0x110/0x114
[    2.181381]  ret_from_fork+0x10/0x20
[    2.181391] SMP: stopping secondary CPUs

According to comments in power up handshake:

	/* request the ADB400 to power up */
	if (domain->bits.hskreq) {
		regmap_update_bits(domain->regmap, domain->regs->hsk,
				   domain->bits.hskreq, domain->bits.hskreq);

		/*
		 * ret = regmap_read_poll_timeout(domain->regmap, domain->regs->hsk, reg_val,
		 *				  (reg_val & domain->bits.hskack), 0,
		 *				  USEC_PER_MSEC);
		 * Technically we need the commented code to wait handshake. But that needs
		 * the BLK-CTL module BUS clk-en bit being set.
		 *
		 * There is a separate BLK-CTL module and we will have such a driver for it,
		 * that driver will set the BUS clk-en bit and handshake will be triggered
		 * automatically there. Just add a delay and suppose the handshake finish
		 * after that.
		 */
	}

The BLK-CTL module needs to add delay to wait for a handshake request finished.
For some BLK-CTL module (eg. AudioMix on i.MX8MP) doesn't have BUS clk-en
bit, it is better to add delay in this driver, as the BLK-CTL module doesn't
need to care about how it is powered up.

regmap_read_bypassed() is to make sure the above write IO transaction already
reaches target before udelay().

Fixes: 1496dd4 ("clk: imx: imx8mp: Add pm_runtime support for power saving")
Reported-by: Francesco Dolcini <francesco@dolcini.it>
Closes: https://lore.kernel.org/all/66293535.170a0220.21fe.a2e7@mx.google.com/
Suggested-by: Frank Li <frank.li@nxp.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
staging-kernelci-org pushed a commit to kernelci/linux that referenced this pull request May 22, 2024
AudioMix BLK-CTRL on i.MX8MP encountered an accessing register issue
after power up.

[    2.181035] Kernel panic - not syncing: Asynchronous SError Interrupt
[    2.181038] CPU: 1 PID: 48 Comm: kworker/u16:2 Not tainted 6.9.0-rc5-next-20240424-00003-g21cec88845c6 torvalds#171
[    2.181047] Hardware name: NXP i.MX8MPlus EVK board (DT)
[    2.181050] Workqueue: events_unbound deferred_probe_work_func
[    2.181064] Call trace:
[...]
[    2.181142]  arm64_serror_panic+0x6c/0x78
[    2.181149]  do_serror+0x3c/0x70
[    2.181157]  el1h_64_error_handler+0x30/0x48
[    2.181164]  el1h_64_error+0x64/0x68
[    2.181171]  clk_imx8mp_audiomix_runtime_resume+0x34/0x44
[    2.181183]  __genpd_runtime_resume+0x30/0x80
[    2.181195]  genpd_runtime_resume+0x110/0x244
[    2.181205]  __rpm_callback+0x48/0x1d8
[    2.181213]  rpm_callback+0x68/0x74
[    2.181224]  rpm_resume+0x468/0x6c0
[    2.181234]  __pm_runtime_resume+0x50/0x94
[    2.181243]  pm_runtime_get_suppliers+0x60/0x8c
[    2.181258]  __driver_probe_device+0x48/0x12c
[    2.181268]  driver_probe_device+0xd8/0x15c
[    2.181278]  __device_attach_driver+0xb8/0x134
[    2.181290]  bus_for_each_drv+0x84/0xe0
[    2.181302]  __device_attach+0x9c/0x188
[    2.181312]  device_initial_probe+0x14/0x20
[    2.181323]  bus_probe_device+0xac/0xb0
[    2.181334]  deferred_probe_work_func+0x88/0xc0
[    2.181344]  process_one_work+0x150/0x290
[    2.181357]  worker_thread+0x2f8/0x408
[    2.181370]  kthread+0x110/0x114
[    2.181381]  ret_from_fork+0x10/0x20
[    2.181391] SMP: stopping secondary CPUs

According to comments in power up handshake:

	/* request the ADB400 to power up */
	if (domain->bits.hskreq) {
		regmap_update_bits(domain->regmap, domain->regs->hsk,
				   domain->bits.hskreq, domain->bits.hskreq);

		/*
		 * ret = regmap_read_poll_timeout(domain->regmap, domain->regs->hsk, reg_val,
		 *				  (reg_val & domain->bits.hskack), 0,
		 *				  USEC_PER_MSEC);
		 * Technically we need the commented code to wait handshake. But that needs
		 * the BLK-CTL module BUS clk-en bit being set.
		 *
		 * There is a separate BLK-CTL module and we will have such a driver for it,
		 * that driver will set the BUS clk-en bit and handshake will be triggered
		 * automatically there. Just add a delay and suppose the handshake finish
		 * after that.
		 */
	}

The BLK-CTL module needs to add delay to wait for a handshake request finished.
For some BLK-CTL module (eg. AudioMix on i.MX8MP) doesn't have BUS clk-en
bit, it is better to add delay in this driver, as the BLK-CTL module doesn't
need to care about how it is powered up.

regmap_read_bypassed() is to make sure the above write IO transaction already
reaches target before udelay().

Fixes: 1496dd4 ("clk: imx: imx8mp: Add pm_runtime support for power saving")
Reported-by: Francesco Dolcini <francesco@dolcini.it>
Closes: https://lore.kernel.org/all/66293535.170a0220.21fe.a2e7@mx.google.com/
Suggested-by: Frank Li <frank.li@nxp.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Tested-by: Adam Ford <aford173@gmail.com>
Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Link: https://lore.kernel.org/r/1715396125-3724-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
johnhubbard pushed a commit to johnhubbard/linux that referenced this pull request May 29, 2024
AudioMix BLK-CTRL on i.MX8MP encountered an accessing register issue
after power up.

[    2.181035] Kernel panic - not syncing: Asynchronous SError Interrupt
[    2.181038] CPU: 1 PID: 48 Comm: kworker/u16:2 Not tainted 6.9.0-rc5-next-20240424-00003-g21cec88845c6 torvalds#171
[    2.181047] Hardware name: NXP i.MX8MPlus EVK board (DT)
[    2.181050] Workqueue: events_unbound deferred_probe_work_func
[    2.181064] Call trace:
[...]
[    2.181142]  arm64_serror_panic+0x6c/0x78
[    2.181149]  do_serror+0x3c/0x70
[    2.181157]  el1h_64_error_handler+0x30/0x48
[    2.181164]  el1h_64_error+0x64/0x68
[    2.181171]  clk_imx8mp_audiomix_runtime_resume+0x34/0x44
[    2.181183]  __genpd_runtime_resume+0x30/0x80
[    2.181195]  genpd_runtime_resume+0x110/0x244
[    2.181205]  __rpm_callback+0x48/0x1d8
[    2.181213]  rpm_callback+0x68/0x74
[    2.181224]  rpm_resume+0x468/0x6c0
[    2.181234]  __pm_runtime_resume+0x50/0x94
[    2.181243]  pm_runtime_get_suppliers+0x60/0x8c
[    2.181258]  __driver_probe_device+0x48/0x12c
[    2.181268]  driver_probe_device+0xd8/0x15c
[    2.181278]  __device_attach_driver+0xb8/0x134
[    2.181290]  bus_for_each_drv+0x84/0xe0
[    2.181302]  __device_attach+0x9c/0x188
[    2.181312]  device_initial_probe+0x14/0x20
[    2.181323]  bus_probe_device+0xac/0xb0
[    2.181334]  deferred_probe_work_func+0x88/0xc0
[    2.181344]  process_one_work+0x150/0x290
[    2.181357]  worker_thread+0x2f8/0x408
[    2.181370]  kthread+0x110/0x114
[    2.181381]  ret_from_fork+0x10/0x20
[    2.181391] SMP: stopping secondary CPUs

According to comments in power up handshake:

	/* request the ADB400 to power up */
	if (domain->bits.hskreq) {
		regmap_update_bits(domain->regmap, domain->regs->hsk,
				   domain->bits.hskreq, domain->bits.hskreq);

		/*
		 * ret = regmap_read_poll_timeout(domain->regmap, domain->regs->hsk, reg_val,
		 *				  (reg_val & domain->bits.hskack), 0,
		 *				  USEC_PER_MSEC);
		 * Technically we need the commented code to wait handshake. But that needs
		 * the BLK-CTL module BUS clk-en bit being set.
		 *
		 * There is a separate BLK-CTL module and we will have such a driver for it,
		 * that driver will set the BUS clk-en bit and handshake will be triggered
		 * automatically there. Just add a delay and suppose the handshake finish
		 * after that.
		 */
	}

The BLK-CTL module needs to add delay to wait for a handshake request finished.
For some BLK-CTL module (eg. AudioMix on i.MX8MP) doesn't have BUS clk-en
bit, it is better to add delay in this driver, as the BLK-CTL module doesn't
need to care about how it is powered up.

regmap_read_bypassed() is to make sure the above write IO transaction already
reaches target before udelay().

Fixes: 1496dd4 ("clk: imx: imx8mp: Add pm_runtime support for power saving")
Reported-by: Francesco Dolcini <francesco@dolcini.it>
Closes: https://lore.kernel.org/all/66293535.170a0220.21fe.a2e7@mx.google.com/
Suggested-by: Frank Li <frank.li@nxp.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Tested-by: Adam Ford <aford173@gmail.com>
Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Link: https://lore.kernel.org/r/1715396125-3724-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
adeepn pushed a commit to jethome-iot/linux-kernel that referenced this pull request Jun 10, 2024
AudioMix BLK-CTRL on i.MX8MP encountered an accessing register issue
after power up.

[    2.181035] Kernel panic - not syncing: Asynchronous SError Interrupt
[    2.181038] CPU: 1 PID: 48 Comm: kworker/u16:2 Not tainted 6.9.0-rc5-next-20240424-00003-g21cec88845c6 torvalds#171
[    2.181047] Hardware name: NXP i.MX8MPlus EVK board (DT)
[    2.181050] Workqueue: events_unbound deferred_probe_work_func
[    2.181064] Call trace:
[...]
[    2.181142]  arm64_serror_panic+0x6c/0x78
[    2.181149]  do_serror+0x3c/0x70
[    2.181157]  el1h_64_error_handler+0x30/0x48
[    2.181164]  el1h_64_error+0x64/0x68
[    2.181171]  clk_imx8mp_audiomix_runtime_resume+0x34/0x44
[    2.181183]  __genpd_runtime_resume+0x30/0x80
[    2.181195]  genpd_runtime_resume+0x110/0x244
[    2.181205]  __rpm_callback+0x48/0x1d8
[    2.181213]  rpm_callback+0x68/0x74
[    2.181224]  rpm_resume+0x468/0x6c0
[    2.181234]  __pm_runtime_resume+0x50/0x94
[    2.181243]  pm_runtime_get_suppliers+0x60/0x8c
[    2.181258]  __driver_probe_device+0x48/0x12c
[    2.181268]  driver_probe_device+0xd8/0x15c
[    2.181278]  __device_attach_driver+0xb8/0x134
[    2.181290]  bus_for_each_drv+0x84/0xe0
[    2.181302]  __device_attach+0x9c/0x188
[    2.181312]  device_initial_probe+0x14/0x20
[    2.181323]  bus_probe_device+0xac/0xb0
[    2.181334]  deferred_probe_work_func+0x88/0xc0
[    2.181344]  process_one_work+0x150/0x290
[    2.181357]  worker_thread+0x2f8/0x408
[    2.181370]  kthread+0x110/0x114
[    2.181381]  ret_from_fork+0x10/0x20
[    2.181391] SMP: stopping secondary CPUs

According to comments in power up handshake:

	/* request the ADB400 to power up */
	if (domain->bits.hskreq) {
		regmap_update_bits(domain->regmap, domain->regs->hsk,
				   domain->bits.hskreq, domain->bits.hskreq);

		/*
		 * ret = regmap_read_poll_timeout(domain->regmap, domain->regs->hsk, reg_val,
		 *				  (reg_val & domain->bits.hskack), 0,
		 *				  USEC_PER_MSEC);
		 * Technically we need the commented code to wait handshake. But that needs
		 * the BLK-CTL module BUS clk-en bit being set.
		 *
		 * There is a separate BLK-CTL module and we will have such a driver for it,
		 * that driver will set the BUS clk-en bit and handshake will be triggered
		 * automatically there. Just add a delay and suppose the handshake finish
		 * after that.
		 */
	}

The BLK-CTL module needs to add delay to wait for a handshake request finished.
For some BLK-CTL module (eg. AudioMix on i.MX8MP) doesn't have BUS clk-en
bit, it is better to add delay in this driver, as the BLK-CTL module doesn't
need to care about how it is powered up.

regmap_read_bypassed() is to make sure the above write IO transaction already
reaches target before udelay().

Fixes: 1496dd4 ("clk: imx: imx8mp: Add pm_runtime support for power saving")
Reported-by: Francesco Dolcini <francesco@dolcini.it>
Closes: https://lore.kernel.org/all/66293535.170a0220.21fe.a2e7@mx.google.com/
Suggested-by: Frank Li <frank.li@nxp.com>
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Tested-by: Adam Ford <aford173@gmail.com>
Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Link: https://lore.kernel.org/r/1715396125-3724-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
kenplusplus pushed a commit to cc-api/linux that referenced this pull request Sep 6, 2024
Without this patch, lockdep complains as follows and disable it.
 =============================
 [ BUG: Invalid wait context ]
 5.18.0-rc1 torvalds#171 Not tainted
 -----------------------------
 swapper/0/1 is trying to lock:
 ffffffff978f7978 (&port_lock_key){....}-{3:3}, at: serial8250_console_write+0x557/0x610
 other info that might help us debug this:
 context-{5:5}
 3 locks held by swapper/0/1:
  #0: ffffffff95a9ab48 (rcu_tasks.cbs_gbl_lock){....}-{2:2}, at: cblist_init_generic+0x29/0x310
  #1: ffffffff95a86d60 (console_lock){+.+.}-{0:0}, at: vprintk_emit+0x153/0x200
  #2: ffffffff959a66c0 (console_owner){....}-{0:0}, at: console_unlock+0x27a/0x620
 stack backtrace:
 CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.18.0-rc1-yamahata-kvm-upstream+ torvalds#171 eb656e2c6a2533f980e80fcf0fe9314dd3ea2a22
 Hardware name: Intel Corporation EAGLESTREAM/EAGLESTREAM, BIOS EGSDCRB1.SYS.0066.D24.2110072326 10/07/2021
 Call Trace:
  <TASK>
  show_stack+0x52/0x58
  dump_stack_lvl+0x5b/0x82
  dump_stack+0x10/0x12
  check_wait_context.cold+0xc0/0xfe
  __lock_acquire+0x222/0x990
  lock_acquire.part.0+0x126/0x2f0
  ? serial8250_console_write+0x557/0x610
  ? rcu_read_unlock+0x50/0x50
  ? check_prev_add+0x1270/0x1270
  ? __this_cpu_preempt_check+0x13/0x20
  lock_acquire+0x8f/0x180
  ? serial8250_console_write+0x557/0x610
  _raw_spin_lock_irqsave+0x43/0x60
  ? serial8250_console_write+0x557/0x610
  serial8250_console_write+0x557/0x610
  ? serial8250_config_port+0x210/0x210
  ? rcu_read_unlock+0x50/0x50
  ? __lock_release+0x14d/0x2d0
  ? record_print_text+0x206/0x260
  ? console_unlock+0x2a5/0x620
  ? __this_cpu_preempt_check+0x13/0x20
  univ8250_console_write+0x4b/0x60
  call_console_drivers.constprop.0+0x180/0x250
  console_unlock+0x2d0/0x620
  ? console_unlock+0x27a/0x620
  ? devkmsg_read+0x420/0x420
  ? __down_trylock_console_sem+0x7c/0xc0
  ? vprintk_emit+0x153/0x200
  vprintk_emit+0x1a4/0x200
  vprintk_default+0x1d/0x20
  vprintk+0x4e/0x60
  _printk+0xb2/0xe3
  ? record_print_text.cold+0x11/0x11
  ? rwlock_bug.part.0+0x60/0x60
  ? lock_acquire+0x8f/0x180
  ? cblist_init_generic+0x29/0x310
  ? do_raw_spin_lock+0x11e/0x1b0
  ? do_raw_spin_lock+0x109/0x1b0
  cblist_init_generic.cold+0x44/0x52
  rcu_init_tasks_generic+0x15/0x164
  kernel_init_freeable+0x103/0x1ba
  ? rest_init+0x340/0x340
  kernel_init+0x1f/0x170
  ? rest_init+0x340/0x340
  ret_from_fork+0x1f/0x30
  </TASK>

Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
kenplusplus pushed a commit to cc-api/linux that referenced this pull request Sep 6, 2024
Without this patch, lockdep complains as follows and disable it.
 =============================
 [ BUG: Invalid wait context ]
 5.18.0-rc1 torvalds#171 Not tainted
 -----------------------------
 swapper/0/1 is trying to lock:
 ffffffff978f7978 (&port_lock_key){....}-{3:3}, at: serial8250_console_write+0x557/0x610
 other info that might help us debug this:
 context-{5:5}
 3 locks held by swapper/0/1:
  #0: ffffffff95a9ab48 (rcu_tasks.cbs_gbl_lock){....}-{2:2}, at: cblist_init_generic+0x29/0x310
  #1: ffffffff95a86d60 (console_lock){+.+.}-{0:0}, at: vprintk_emit+0x153/0x200
  #2: ffffffff959a66c0 (console_owner){....}-{0:0}, at: console_unlock+0x27a/0x620
 stack backtrace:
 CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.18.0-rc1-yamahata-kvm-upstream+ torvalds#171 eb656e2c6a2533f980e80fcf0fe9314dd3ea2a22
 Hardware name: Intel Corporation EAGLESTREAM/EAGLESTREAM, BIOS EGSDCRB1.SYS.0066.D24.2110072326 10/07/2021
 Call Trace:
  <TASK>
  show_stack+0x52/0x58
  dump_stack_lvl+0x5b/0x82
  dump_stack+0x10/0x12
  check_wait_context.cold+0xc0/0xfe
  __lock_acquire+0x222/0x990
  lock_acquire.part.0+0x126/0x2f0
  ? serial8250_console_write+0x557/0x610
  ? rcu_read_unlock+0x50/0x50
  ? check_prev_add+0x1270/0x1270
  ? __this_cpu_preempt_check+0x13/0x20
  lock_acquire+0x8f/0x180
  ? serial8250_console_write+0x557/0x610
  _raw_spin_lock_irqsave+0x43/0x60
  ? serial8250_console_write+0x557/0x610
  serial8250_console_write+0x557/0x610
  ? serial8250_config_port+0x210/0x210
  ? rcu_read_unlock+0x50/0x50
  ? __lock_release+0x14d/0x2d0
  ? record_print_text+0x206/0x260
  ? console_unlock+0x2a5/0x620
  ? __this_cpu_preempt_check+0x13/0x20
  univ8250_console_write+0x4b/0x60
  call_console_drivers.constprop.0+0x180/0x250
  console_unlock+0x2d0/0x620
  ? console_unlock+0x27a/0x620
  ? devkmsg_read+0x420/0x420
  ? __down_trylock_console_sem+0x7c/0xc0
  ? vprintk_emit+0x153/0x200
  vprintk_emit+0x1a4/0x200
  vprintk_default+0x1d/0x20
  vprintk+0x4e/0x60
  _printk+0xb2/0xe3
  ? record_print_text.cold+0x11/0x11
  ? rwlock_bug.part.0+0x60/0x60
  ? lock_acquire+0x8f/0x180
  ? cblist_init_generic+0x29/0x310
  ? do_raw_spin_lock+0x11e/0x1b0
  ? do_raw_spin_lock+0x109/0x1b0
  cblist_init_generic.cold+0x44/0x52
  rcu_init_tasks_generic+0x15/0x164
  kernel_init_freeable+0x103/0x1ba
  ? rest_init+0x340/0x340
  kernel_init+0x1f/0x170
  ? rest_init+0x340/0x340
  ret_from_fork+0x1f/0x30
  </TASK>

Signed-off-by: Isaku Yamahata <isaku.yamahata@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants