bisecting fixing commit since 210e04ff768142b96452030c4c2627512b30ad95 building syzkaller on 744a39e220cece33e207035facce6c5ae161b775 testing commit 210e04ff768142b96452030c4c2627512b30ad95 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: db62f2037b99f7f424520d93990537484124ac71da3713af97f13972d741f261 all runs: crashed: KASAN: use-after-free Read in ath9k_hif_usb_reg_in_cb testing current HEAD 47700948a4abb4a5ae13ef943ff682a7f327547a testing commit 47700948a4abb4a5ae13ef943ff682a7f327547a compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 7c0da1f48f13aaa2961f7d9fb65904e7fef486f4ee3191d3a8c2847860bc33dd all runs: OK # git bisect start 47700948a4abb4a5ae13ef943ff682a7f327547a 210e04ff768142b96452030c4c2627512b30ad95 Bisecting: 7484 revisions left to test after this (roughly 13 steps) [2518f226c60d8e04d18ba4295500a5b0b8ac7659] Merge tag 'drm-next-2022-05-25' of git://anongit.freedesktop.org/drm/drm testing commit 2518f226c60d8e04d18ba4295500a5b0b8ac7659 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: eceb6bc081fce44ec6717d3ca736835e9aee89a878827a0dec06392a8e02b682 all runs: OK # git bisect bad 2518f226c60d8e04d18ba4295500a5b0b8ac7659 Bisecting: 3998 revisions left to test after this (roughly 12 steps) [5d1772b1739b085721431eef0c0400f3aff01abf] Merge branch 'for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq testing commit 5d1772b1739b085721431eef0c0400f3aff01abf compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 231b1ce6fdea27e25515ee91579fc7db978bffe8fe27a6c1a4ffa340034cedae all runs: OK # git bisect bad 5d1772b1739b085721431eef0c0400f3aff01abf Bisecting: 1567 revisions left to test after this (roughly 11 steps) [efd1df1982e9203b4f56cb0d5946a24885260ce5] Merge tag 'selinux-pr-20220523' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux testing commit efd1df1982e9203b4f56cb0d5946a24885260ce5 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 57d878049109344cf8aa59705b9f0d4a79c68bf5ee77aaffae0b4c45db50e840 all runs: crashed: KASAN: use-after-free Read in ath9k_hif_usb_reg_in_cb # git bisect good efd1df1982e9203b4f56cb0d5946a24885260ce5 Bisecting: 888 revisions left to test after this (roughly 10 steps) [268db333b561c77dee3feb6831806412293b4a7e] Merge tag 'devprop-5.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm testing commit 268db333b561c77dee3feb6831806412293b4a7e compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: e958b82adac2f1697611f00dbdc8bda8564e17496d191842c91414851bb156d8 all runs: crashed: KASAN: use-after-free Read in ath9k_hif_usb_reg_in_cb # git bisect good 268db333b561c77dee3feb6831806412293b4a7e Bisecting: 364 revisions left to test after this (roughly 9 steps) [bd1b7c1384ec15294ee45bf3add7b7036e146dad] Merge tag 'for-5.19-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux testing commit bd1b7c1384ec15294ee45bf3add7b7036e146dad compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 83f23463f6bd737248ed6717a6f83e646b118ec167b8ca77f67c6c032f71746d all runs: crashed: KASAN: use-after-free Read in ath9k_hif_usb_reg_in_cb # git bisect good bd1b7c1384ec15294ee45bf3add7b7036e146dad Bisecting: 188 revisions left to test after this (roughly 8 steps) [caa28984163cb63ea0be4cb8dbf05defdc7303f9] linux/types.h: reinstate "__bitwise__" macro for user space use testing commit caa28984163cb63ea0be4cb8dbf05defdc7303f9 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 05e6fdd072ca449518e30f634905a1f0ac8e631205db988ee6a0940beb95d7dd all runs: crashed: KASAN: use-after-free Read in ath9k_hif_usb_reg_in_cb # git bisect good caa28984163cb63ea0be4cb8dbf05defdc7303f9 Bisecting: 77 revisions left to test after this (roughly 7 steps) [88a618920e9baabc1780479e2fbb68e5551d0563] Merge tag 'docs-5.19' of git://git.lwn.net/linux testing commit 88a618920e9baabc1780479e2fbb68e5551d0563 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 23c6cebf03f1e612eff38b5da0f055e5e782f4c0983caa04870cdb353d1a91a9 all runs: OK # git bisect bad 88a618920e9baabc1780479e2fbb68e5551d0563 Bisecting: 55 revisions left to test after this (roughly 6 steps) [039d5926c4028ec53c1e777349ac58588e69f7fb] docs/ja_JP/SubmittingPatches: Update GregKH links testing commit 039d5926c4028ec53c1e777349ac58588e69f7fb compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 4c2d65c5fb6a729677feac2f36f0fbe2d8002ec216cbc52d2f50adbc5d532cce all runs: crashed: KASAN: use-after-free Read in ath9k_hif_usb_reg_in_cb # git bisect good 039d5926c4028ec53c1e777349ac58588e69f7fb Bisecting: 35 revisions left to test after this (roughly 5 steps) [2e17ce1106e04a7f3a83796ec623881487f75dd3] Merge tag 'slab-for-5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab testing commit 2e17ce1106e04a7f3a83796ec623881487f75dd3 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: f3258467c14b8231fc2978c317954b7bb5721da68c77e3f230f6f7c808cb25f3 all runs: crashed: KASAN: use-after-free Read in ath9k_hif_usb_reg_in_cb # git bisect good 2e17ce1106e04a7f3a83796ec623881487f75dd3 Bisecting: 16 revisions left to test after this (roughly 4 steps) [1c6fd59943a630f087b4b3089aefdcb0bf43cca0] Merge branch 'rework/kthreads' into for-linus testing commit 1c6fd59943a630f087b4b3089aefdcb0bf43cca0 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 415a3361094e3c29748be0289dd4f92fdfdf5bfcc3ede86f843fccf50078ee68 all runs: OK # git bisect bad 1c6fd59943a630f087b4b3089aefdcb0bf43cca0 Bisecting: 9 revisions left to test after this (roughly 3 steps) [a699449bb13b70b8bd10dc03ad7327ea3993221e] printk: refactor and rework printing logic testing commit a699449bb13b70b8bd10dc03ad7327ea3993221e compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 6a6786a2f4b7b3f4c737561567f73660ad66b06735aa27cb05bf6a84a95cf074 all runs: crashed: KASAN: use-after-free Read in ath9k_hif_usb_reg_in_cb # git bisect good a699449bb13b70b8bd10dc03ad7327ea3993221e Bisecting: 4 revisions left to test after this (roughly 2 steps) [8e274732115f63c1d09136284431b3555bd5cc56] printk: extend console_lock for per-console locking testing commit 8e274732115f63c1d09136284431b3555bd5cc56 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 09e3f9c3bcbdbbe506e2da8040610cecb72076783ffd00b0bd5c6605c33bf5d3 all runs: OK # git bisect bad 8e274732115f63c1d09136284431b3555bd5cc56 Bisecting: 2 revisions left to test after this (roughly 1 step) [3b604ca81202eea2a917eb6491e90f610fba0ec7] printk: add pr_flush() testing commit 3b604ca81202eea2a917eb6491e90f610fba0ec7 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: aaa7d8808a1a00d1f15d8f8f6bcb0c1b4d4de7214725aa68e8521010b3f8df8f all runs: crashed: KASAN: use-after-free Read in ath9k_hif_usb_reg_in_cb # git bisect good 3b604ca81202eea2a917eb6491e90f610fba0ec7 Bisecting: 0 revisions left to test after this (roughly 1 step) [09c5ba0aa2fcfdadb17d045c3ee6f86d69270df7] printk: add kthread console printers testing commit 09c5ba0aa2fcfdadb17d045c3ee6f86d69270df7 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: 94b9e7119356a0397a98feec979daaf7ec8192fa1d8c0f2b7c96fa6fbe63ef9a all runs: OK # git bisect bad 09c5ba0aa2fcfdadb17d045c3ee6f86d69270df7 Bisecting: 0 revisions left to test after this (roughly 0 steps) [2bb2b7b57f81255c13f4395ea911d6bdc70c9fe2] printk: add functions to prefer direct printing testing commit 2bb2b7b57f81255c13f4395ea911d6bdc70c9fe2 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: b0f3e581aa6c77b071e478aeecc94c4f49eb162bf01f35b56fcc03989619be93 run #0: basic kernel testing failed: BUG: program execution failed: executor NUM: exit status NUM run #1: crashed: KASAN: use-after-free Read in ath9k_hif_usb_reg_in_cb run #2: crashed: KASAN: use-after-free Read in ath9k_hif_usb_reg_in_cb run #3: crashed: KASAN: use-after-free Read in ath9k_hif_usb_reg_in_cb run #4: crashed: KASAN: use-after-free Read in ath9k_hif_usb_reg_in_cb run #5: crashed: KASAN: use-after-free Read in ath9k_hif_usb_reg_in_cb run #6: crashed: KASAN: use-after-free Read in ath9k_hif_usb_reg_in_cb run #7: crashed: KASAN: use-after-free Read in ath9k_hif_usb_reg_in_cb run #8: crashed: KASAN: use-after-free Read in ath9k_hif_usb_reg_in_cb run #9: crashed: KASAN: use-after-free Read in ath9k_hif_usb_reg_in_cb # git bisect good 2bb2b7b57f81255c13f4395ea911d6bdc70c9fe2 09c5ba0aa2fcfdadb17d045c3ee6f86d69270df7 is the first bad commit commit 09c5ba0aa2fcfdadb17d045c3ee6f86d69270df7 Author: John Ogness Date: Thu Apr 21 23:28:48 2022 +0206 printk: add kthread console printers Create a kthread for each console to perform console printing. During normal operation (@system_state == SYSTEM_RUNNING), the kthread printers are responsible for all printing on their respective consoles. During non-normal operation, console printing is done as it has been: within the context of the printk caller or within irqwork triggered by the printk caller, referred to as direct printing. Since threaded console printers are responsible for all printing during normal operation, this also includes messages generated via deferred printk calls. If direct printing is in effect during a deferred printk call, the queued irqwork will perform the direct printing. To make it clear that this is the only time that the irqwork will perform direct printing, rename the flag PRINTK_PENDING_OUTPUT to PRINTK_PENDING_DIRECT_OUTPUT. Threaded console printers synchronize against each other and against console lockers by taking the console lock for each message that is printed. Note that the kthread printers do not care about direct printing. They will always try to print if new records are available. They can be blocked by direct printing, but will be woken again once direct printing is finished. Console unregistration is a bit tricky because the associated kthread printer cannot be stopped while the console lock is held. A policy is implemented that states: whichever task clears con->thread (under the console lock) is responsible for stopping the kthread. unregister_console() will clear con->thread while the console lock is held and then stop the kthread after releasing the console lock. For consoles that have implemented the exit() callback, the kthread is stopped before exit() is called. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20220421212250.565456-14-john.ogness@linutronix.de include/linux/console.h | 2 + kernel/printk/printk.c | 329 ++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 309 insertions(+), 22 deletions(-) culprit signature: 94b9e7119356a0397a98feec979daaf7ec8192fa1d8c0f2b7c96fa6fbe63ef9a parent signature: b0f3e581aa6c77b071e478aeecc94c4f49eb162bf01f35b56fcc03989619be93 revisions tested: 17, total time: 3h42m30.674992508s (build: 1h54m11.102469611s, test: 1h46m28.253407403s) first good commit: 09c5ba0aa2fcfdadb17d045c3ee6f86d69270df7 printk: add kthread console printers recipients (to): ["gregkh@linuxfoundation.org" "john.ogness@linutronix.de" "linux-kernel@vger.kernel.org" "pmladek@suse.com" "pmladek@suse.com" "senozhatsky@chromium.org"] recipients (cc): ["john.ogness@linutronix.de" "rostedt@goodmis.org"]