From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.167.197 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795993680; b=MECbVN8GjOk694JRuDsQrkqXd+IhWZ9A764xy2fP3kMTQ5eUQcII+eSNrcicO0sNH2dP xjpF+SruK2uHYzYlaSNcq3e5YlO5Y92xPWly5dN09W1A18wMbrhdz+TLy8ZLBEQCwY0PZ XL5UsqLGKbc/sgb9eYr5Y+yZ75Aqa2gwKqmVOGifPdCwKy1P3sOU2WSI2nXlRaabWi03w RpmHOU7+O5IZfsaGdiziSvv90OLwcvDCCqJdKCj4Od/zO8Corn2q5ALoQqZJrEetiiR0C ayA0QOfUcRhEMIU7ch/I/7fueM78ByqYzV95tU7E94w6YDlnom0QRAvidu9/2lp8TLw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795993680; h=DMARC-Filter:Received:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:MIME-Version:X-Received:Date: X-Google-Appengine-App-Id:X-Google-Appengine-App-Id-Alias:Message-ID: Subject:From:To:Content-Type; bh=MPh39PHo/p+Il4KyVCh3hMrhKVlgZkPVKT1MTD8NQaM=; b=QIYSEFZu8r8sgV40FGh+Bi6Qiq+Vhy/+5Xb9AimFOh3lX4of5qkykCf92gobG6zvfPJE Bu+c/SZnonEFooZkPe1H9mUNsjE0EHhsfzl2msMmLUUMSvSN4MoBD6Z2cRhtw20Sl/UQc ppmr1c+6KuJaMwVz6t8Xld/K3zZaFrw99evgMsm6wwifyU52WhF2FyMfbUIjeWu6o3rX6 M7p7uybtA3LI34hpHngKyhBKLHwlO4M9g8favfei+AOGL2NTqIhkUDl/4AGbmJCsUA9Q3 hFhN2Kyj6BQmqL7vXlbaUkeOxUDOkQmsm+Z7irPw/MOWlBa9GlUhz+imkuZ+Dv7T39g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.remote-ip=209.85.167.197 Received: from mail-oi1-f197.google.com (mail-oi1-f197.google.com [209.85.167.197]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8EA52606A327 for ; Sun, 29 Nov 2026 23:08:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 8EA52606A327 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com Received: by mail-oi1-f197.google.com with SMTP id 5614622812f47-4dab94dc3e7so19351142b6e.0 for ; Sun, 29 Nov 2026 15:08:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795993679; x=1796598479; h=content-type:to:from:subject:message-id:date:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=MPh39PHo/p+Il4KyVCh3hMrhKVlgZkPVKT1MTD8NQaM=; b=ZoujrCQznQmUQ30Lllg5m606R1D+5ASUYDU+mqSo9xMzZTSiyHAmx6Qa6oX/94sw0g bL+N4SUs12n0dd1v0Q1SMFruLxhXjmozS2kCMMcc10ArI5suQUq9UiDbDKON447nXngU jnmUKQ64GHRAGGqRNPT643puo9dK7Niud9zRD0bDw6Qk+4IbJwavrDUzV9Q2Z7nC02/E 3EuB3ugXH5Xft6EV5+ox/uprENhUswG4flr/Zie8fu35jnOs7Jlup7D/jpWQ11mMimGg S5ERGzQy7GXhx37KwmGEzW9xeo+Gay8IhsYiSu2QcZLeSHCe5fAoHukQAmutMjKSccdb 61Gw== X-Forwarded-Encrypted: i=1; AL+hErFqiWSPw2n722smExXMtFptdfO6aKu+nS+wLosMYk/4kgMvF2YlV5g7vJXtHHC09DI6inqJx27HVNcvapk=@vger.kernel.org X-Gm-Message-State: APuU4Z92shmul1a/pzCkvHcaRmIVXrRC06wCSJOJtW0Q4ZtCRMGZDjJV lmaSbnW2rGWArb0G8nwuw9imR4o9/QGxMpTOtFqAMKWAkj+R6DgkRhumyQA6EZgikI5UJeoJfEk sdKOGQRciU+Y2BNn4opD4t+mYvxi7d8qZd5N/Oc8iTFDOJI/9Ru4FWnyOOZA= X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Received: by 2002:a05:6808:c12e:b0:572:1c6:6108 with SMTP id 5614622812f47-57a0a20aff8mr33152052b6e.12.1795993679580; Sun, 29 Nov 2026 15:07:59 -0800 (PST) Date: Sun, 29 Nov 2026 15:07:59 -0800 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <6b0cb04f.8be61036.1c76e2.004f.GAE@google.com> Subject: [syzbot] [block?] WARNING in scsi_device_dev_release From: syzbot To: James.Bottomley@HansenPartnership.com, hare@suse.de, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, martin.petersen@oracle.com, ming.lei@redhat.com, mkp@kernel.org, sumanesh.samanta@broadcom.com, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" Hello, syzbot found the following issue on: HEAD commit: 822ba3a89c78 Merge tag 'arm64-fixes' of git://git.kernel.o.. git tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git console output: https://syzkaller.appspot.com/x/log.txt?x=12310903580000 kernel config: https://syzkaller.appspot.com/x/.config?x=284ed4d28353a6ff dashboard link: https://syzkaller.appspot.com/bug?extid=01c4f5314d8c18f22177 compiler: gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44 C reproducer: https://syzkaller.appspot.com/x/repro.c?x=14622dbd580000 The issue was bisected by AI to: commit c548e62bcf6adc7066ff201e9ecc88e536dd8890 Author: Ming Lei Date: Fri Jan 22 02:33:08 2021 +0000 scsi: sbitmap: Move allocation hint into sbitmap reasoning: https://syzkaller.appspot.com/ai_job?id=d8329c3a-1a26-41d0-9dab-58428a8b6e0b AI-generated root cause summary: In sbitmap_init_node() (lib/sbitmap.c), when kvzalloc_node() fails to allocate sb->map after init_alloc_hint() has already succeeded, the error path calls free_percpu(sb->alloc_hint) without resetting sb->alloc_hint to NULL. During SCSI device allocation failure cleanup in scsi_alloc_sdev(), __scsi_remove_device() drops the device reference and triggers scsi_device_dev_release(), which unconditionally calls sbitmap_free(&sdev->budget_map). Because sb->alloc_hint still holds the dangling per-CPU pointer (and sbitmap_free() in include/linux/sbitmap.h also does not clear sb->alloc_hint), free_percpu() is invoked a second time on the already-freed per-CPU allocation, triggering the WARN_ON_ONCE(1) in mm/percpu.c. full analysis: https://syzkaller.appspot.com/x/ai_root_cause?x=01c4f5314d8c18f22177 IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+01c4f5314d8c18f22177@syzkaller.appspotmail.com The bisection result may be wrong. If you agree with it, please also add: Fixes: c548e62bcf6a ("scsi: sbitmap: Move allocation hint into sbitmap") Node 1 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB Node 1 hugepages_total=2 hugepages_free=2 hugepages_surp=0 hugepages_size=2048kB 46836 total pagecache pages 0 pages in swap cache Free swap = 124996kB Total swap = 124996kB 2097051 pages RAM 0 pages HighMem/MovableOnly 438546 pages reserved 0 pages cma reserved ------------[ cut here ]------------ 1 WARNING: mm/percpu.c:2262 at free_percpu mm/percpu.c:2262 [inline], CPU#1: syz-executor419/6020 WARNING: mm/percpu.c:2262 at free_percpu+0x7cd/0x1510 mm/percpu.c:2239, CPU#1: syz-executor419/6020 Modules linked in: CPU: 1 UID: 0 PID: 6020 Comm: syz-executor419 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026 RIP: 0010:free_percpu mm/percpu.c:2262 [inline] RIP: 0010:free_percpu+0x7cd/0x1510 mm/percpu.c:2239 Code: 49 29 c7 4d 01 ef 4c 39 fd 0f 82 12 fa ff ff e9 00 f9 ff ff e8 54 b6 a9 ff 48 8b 34 24 48 c7 c7 40 19 1a 90 e8 d4 6d 91 09 90 <0f> 0b 90 e9 46 ff ff ff e8 36 b6 a9 ff 48 3b 1d bf fe 2a 0c 0f 84 RSP: 0018:ffffc9000398f540 EFLAGS: 00010286 RAX: 8000000000000001 RBX: ffff888020e85c00 RCX: 0000000000000000 RDX: 0000000000000004 RSI: ffffffff8e62e6c9 RDI: 0000000000000001 RBP: 0000000000025cf0 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000000 R12: 0000607edd7c8cf0 R13: 0000000000000000 R14: ffff888020e85c80 R15: 0000000000025cf0 FS: 000055557344d400(0000) GS:ffff88812255d000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f2957eab708 CR3: 000000005a68c000 CR4: 00000000003526f0 Call Trace: sbitmap_free include/linux/sbitmap.h:187 [inline] scsi_device_dev_release+0x5fc/0x12b0 drivers/scsi/scsi_sysfs.c:482 device_release+0xd2/0x270 drivers/base/core.c:2640 kobject_cleanup lib/kobject.c:689 [inline] kobject_release lib/kobject.c:720 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x1f7/0x640 lib/kobject.c:737 put_device+0x1f/0x30 drivers/base/core.c:3886 __scsi_remove_device+0x2a3/0x430 drivers/scsi/scsi_sysfs.c:1527 scsi_alloc_sdev+0xc2a/0xe90 drivers/scsi/scsi_scan.c:384 scsi_probe_and_add_lun+0x555/0xd30 drivers/scsi/scsi_scan.c:1227 __scsi_scan_target+0x1a3/0x4b0 drivers/scsi/scsi_scan.c:1803 scsi_scan_channel+0x1b6/0x1e0 drivers/scsi/scsi_scan.c:1897 scsi_scan_host_selected+0x307/0x3f0 drivers/scsi/scsi_scan.c:1922 scsi_scan drivers/scsi/scsi_sysfs.c:151 [inline] store_scan+0x435/0x480 drivers/scsi/scsi_sysfs.c:191 dev_attr_store+0x58/0x80 drivers/base/core.c:2509 sysfs_kf_write+0xf2/0x150 fs/sysfs/file.c:145 kernfs_fop_write_iter+0x3e0/0x5f0 fs/kernfs/file.c:345 new_sync_write fs/read_write.c:575 [inline] vfs_write+0x6af/0x1040 fs/read_write.c:667 ksys_pwrite64+0x113/0x230 fs/read_write.c:774 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline] do_syscall_64+0x123/0x7b0 arch/x86/entry/syscall_64.c:89 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fef31abed37 Code: 48 89 fa 4c 89 df e8 98 1d 00 00 8b 93 08 03 00 00 59 5e 48 83 f8 fc 74 1a 5b c3 0f 1f 84 00 00 00 00 00 48 8b 44 24 10 0f 05 <5b> c3 0f 1f 80 00 00 00 00 83 e2 39 83 fa 08 75 de e8 23 ff ff ff RSP: 002b:00007ffe60061720 EFLAGS: 00000202 ORIG_RAX: 0000000000000012 RAX: ffffffffffffffda RBX: 000055557344d400 RCX: 00007fef31abed37 RDX: 0000000000000005 RSI: 00007fef31af40c8 RDI: 0000000000000006 RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000202 R12: 00007ffe60061820 R13: 0000000000000002 R14: 0000000000000004 R15: 000055557344d3d8 --- This report is generated by a bot. It may contain errors. See https://goo.gl/tpsmEJ for more information about syzbot. syzbot engineers can be reached at syzkaller@googlegroups.com. syzbot will keep track of this issue. See: https://goo.gl/tpsmEJ#status for how to communicate with syzbot. For information about bisection process see: https://goo.gl/tpsmEJ#ai-bisection If the report is already addressed, let syzbot know by replying with: #syz fix: exact-commit-title If you want to overwrite report's subsystems, reply with: #syz set subsystems: new-subsystem (See the list of subsystem names on the web dashboard) If the report is a duplicate of another one, reply with: #syz dup: exact-subject-of-another-report If you want to undo deduplication, reply with: #syz undup