{"id":72135,"date":"2025-10-22T17:45:48","date_gmt":"2025-10-22T14:15:48","guid":{"rendered":"https:\/\/afaghhosting.net\/blog\/cve-2023-53730-blk-iocost-use-spin_lock_irqsave-in-adjust_inuse_and_calc_cost\/"},"modified":"2025-10-22T17:45:48","modified_gmt":"2025-10-22T14:15:48","slug":"cve-2023-53730-blk-iocost-use-spin_lock_irqsave-in-adjust_inuse_and_calc_cost","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/cve-2023-53730-blk-iocost-use-spin_lock_irqsave-in-adjust_inuse_and_calc_cost\/","title":{"rendered":"CVE-2023-53730 &#8211; blk-iocost: use spin_lock_irqsave in adjust_inuse_and_calc_cost"},"content":{"rendered":"<p>CVE ID : CVE-2023-53730<\/p>\n<p>Published :  Oct. 22, 2025, 2:15 p.m. | 27\u00a0minutes ago<\/p>\n<p>Description : In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>blk-iocost: use spin_lock_irqsave in adjust_inuse_and_calc_cost<\/p>\n<p>adjust_inuse_and_calc_cost() use spin_lock_irq() and IRQ will be enabled<br \/>\nwhen unlock. DEADLOCK might happen if we have held other locks and disabled<br \/>\nIRQ before invoking it.<\/p>\n<p>Fix it by using spin_lock_irqsave() instead, which can keep IRQ state<br \/>\nconsistent with before when unlock.<\/p>\n<p>  ================================<br \/>\n  WARNING: inconsistent lock state<br \/>\n  5.10.0-02758-g8e5f91fd772f #26 Not tainted<br \/>\n  &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n  inconsistent {IN-HARDIRQ-W} -&gt; {HARDIRQ-ON-W} usage.<br \/>\n  kworker\/2:3\/388 [HC0[0]:SC0[0]:HE0:SE1] takes:<br \/>\n  ffff888118c00c28 (&amp;bfqd-&gt;lock){?.-.}-{2:2}, at: spin_lock_irq<br \/>\n  ffff888118c00c28 (&amp;bfqd-&gt;lock){?.-.}-{2:2}, at: bfq_bio_merge+0x141\/0x390<br \/>\n  {IN-HARDIRQ-W} state was registered at:<br \/>\n    __lock_acquire+0x3d7\/0x1070<br \/>\n    lock_acquire+0x197\/0x4a0<br \/>\n    __raw_spin_lock_irqsave<br \/>\n    _raw_spin_lock_irqsave+0x3b\/0x60<br \/>\n    bfq_idle_slice_timer_body<br \/>\n    bfq_idle_slice_timer+0x53\/0x1d0<br \/>\n    __run_hrtimer+0x477\/0xa70<br \/>\n    __hrtimer_run_queues+0x1c6\/0x2d0<br \/>\n    hrtimer_interrupt+0x302\/0x9e0<br \/>\n    local_apic_timer_interrupt<br \/>\n    __sysvec_apic_timer_interrupt+0xfd\/0x420<br \/>\n    run_sysvec_on_irqstack_cond<br \/>\n    sysvec_apic_timer_interrupt+0x46\/0xa0<br \/>\n    asm_sysvec_apic_timer_interrupt+0x12\/0x20<br \/>\n  irq event stamp: 837522<br \/>\n  hardirqs last  enabled at (837521): [] __raw_spin_unlock_irqrestore<br \/>\n  hardirqs last  enabled at (837521): [] _raw_spin_unlock_irqrestore+0x3d\/0x40<br \/>\n  hardirqs last disabled at (837522): [] __raw_spin_lock_irq<br \/>\n  hardirqs last disabled at (837522): [] _raw_spin_lock_irq+0x43\/0x50<br \/>\n  softirqs last  enabled at (835852): [] __do_softirq+0x558\/0x8ec<br \/>\n  softirqs last disabled at (835845): [] asm_call_irq_on_stack+0xf\/0x20<\/p>\n<p>  other info that might help us debug this:<br \/>\n   Possible unsafe locking scenario:<\/p>\n<p>         CPU0<br \/>\n         &#8212;-<br \/>\n    lock(&amp;bfqd-&gt;lock);<\/p>\n<p>      lock(&amp;bfqd-&gt;lock);<\/p>\n<p>   *** DEADLOCK ***<\/p>\n<p>  3 locks held by kworker\/2:3\/388:<br \/>\n   #0: ffff888107af0f38 ((wq_completion)kthrotld){+.+.}-{0:0}, at: process_one_work+0x742\/0x13f0<br \/>\n   #1: ffff8881176bfdd8 ((work_completion)(&amp;td-&gt;dispatch_work)){+.+.}-{0:0}, at: process_one_work+0x777\/0x13f0<br \/>\n   #2: ffff888118c00c28 (&amp;bfqd-&gt;lock){?.-.}-{2:2}, at: spin_lock_irq<br \/>\n   #2: ffff888118c00c28 (&amp;bfqd-&gt;lock){?.-.}-{2:2}, at: bfq_bio_merge+0x141\/0x390<\/p>\n<p>  stack backtrace:<br \/>\n  CPU: 2 PID: 388 Comm: kworker\/2:3 Not tainted 5.10.0-02758-g8e5f91fd772f #26<br \/>\n  Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04\/01\/2014<br \/>\n  Workqueue: kthrotld blk_throtl_dispatch_work_fn<br \/>\n  Call Trace:<br \/>\n   __dump_stack lib\/dump_stack.c:77 [inline]\n   dump_stack+0x107\/0x167<br \/>\n   print_usage_bug<br \/>\n   valid_state<br \/>\n   mark_lock_irq.cold+0x32\/0x3a<br \/>\n   mark_lock+0x693\/0xbc0<br \/>\n   mark_held_locks+0x9e\/0xe0<br \/>\n   __trace_hardirqs_on_caller<br \/>\n   lockdep_hardirqs_on_prepare.part.0+0x151\/0x360<br \/>\n   trace_hardirqs_on+0x5b\/0x180<br \/>\n   __raw_spin_unlock_irq<br \/>\n   _raw_spin_unlock_irq+0x24\/0x40<br \/>\n   spin_unlock_irq<br \/>\n   adjust_inuse_and_calc_cost+0x4fb\/0x970<br \/>\n   ioc_rqos_merge+0x277\/0x740<br \/>\n   __rq_qos_merge+0x62\/0xb0<br \/>\n   rq_qos_merge<br \/>\n   bio_attempt_back_merge+0x12c\/0x4a0<br \/>\n   blk_mq_sched_try_merge+0x1b6\/0x4d0<br \/>\n   bfq_bio_merge+0x24a\/0x390<br \/>\n   __blk_mq_sched_bio_merge+0xa6\/0x460<br \/>\n   blk_mq_sched_bio_merge<br \/>\n   blk_mq_submit_bio+0x2e7\/0x1ee0<br \/>\n   __submit_bio_noacct_mq+0x175\/0x3b0<br \/>\n   submit_bio_noacct+0x1fb\/0x270<br \/>\n   blk_throtl_dispatch_work_fn+0x1ef\/0x2b0<br \/>\n   process_one_work+0x83e\/0x13f0<br \/>\n   process_scheduled_works<br \/>\n   worker_thread+0x7e3\/0xd80<br \/>\n   kthread+0x353\/0x470<br \/>\n   ret_from_fork+0x1f\/0x30<\/p>\n<p>Severity: 0.0 | NA<\/p>\n<p>Visit the link for more details, such as CVSS details, affected products, timeline, and more&#8230;\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CVE ID : CVE-2023-53730 Published : Oct. 22, 2025, 2:15 p.m. | 27\u00a0minutes ago Description : In the Linux kernel, the following vulnerability has been resolved: blk-iocost: use spin_lock_irqsave in adjust_inuse_and_calc_cost adjust_inuse_and_calc_cost() use spin_lock_irq() and IRQ will be enabled when unlock. DEADLOCK might happen if we have held other locks and disabled IRQ before invoking &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-72135","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/72135","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=72135"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/72135\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=72135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=72135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=72135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}