From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.69 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795944020; b=C6vLJBMTVCEq4DUfxKFUxwW/nKgmPFC3+V/WkupZXcnjWVoj6NM5um+ZJhc0Ijnz48SX aNjZSaM08rSk+9WAZZYSnK6SJSsFpHL2zk9WJb//euJPGZEdOOW0TK5t49PGSB+nC75v/ QfLeCq/2Omv0EgWmCtUcZ64rUBdZ2JermXMbLaiC/0MUApeZ99P5V3kHg0XpbEm9yqByy kV01R/34WV06QE4UXYszMJvuKmQE0ir9OtBL0dZ7qwehTEvgfvqvIAA6v1FMj6gyxZpyd /sByK/DT0aa/dF5fbgCnPpM6Goec8fDFmXycFm7meUGb8pcTrCh21aZA33JY0O82XhQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795944020; 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=v1FQ9j7J0W5vFn+DSoLVlvKAn3ACH0S4S+CglZ2IFL8=; b=gDP36xouLklqUCf1/CZilqCtvjKg7V0MmS6mO5pcivNoD4WXdmCc4HKeOyz8Q0i7u8W3 +epsQjxYUPpo90T+HQFnFWBTAAgj+zYo957oDzJH2ed1Vl7b+hFGg9qhJJk1IYqlwOBji D5EIIOH/xB1fBStA4HT+oTr1C1tKvUPdfUmWJG9+kuyNLqQLqeUf+v7oOcgPUDFQ/novg OyuJfHsXi5bd9Ky0uJaWxzhJkSghRrj48cXKz6MDNU3H2r0Nd6BuVTp1R/eN+DHdIR6Xu yjRY48v93gnkHNBWcEhCdBO2nWUyhCeDQnvJnXKWMkBHC+w1agwwdaiEwKtmYbicI2g== 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.210.69 Received: from mail-ot1-f69.google.com (mail-ot1-f69.google.com [209.85.210.69]) (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 BDDC8606A325 for ; Sun, 29 Nov 2026 09:20:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BDDC8606A325 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-ot1-f69.google.com with SMTP id 46e09a7af769-8520e83f715so9117578a34.2 for ; Sun, 29 Nov 2026 01:20:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795944018; x=1796548818; 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=v1FQ9j7J0W5vFn+DSoLVlvKAn3ACH0S4S+CglZ2IFL8=; b=cY5UJZQxxtfp9mhjjWj/sDV90GIj9RcwBopqJALb5dE+SFR/1xWn5v9dudoGTHIS2W jKEcHuVViwnOXidIlw6n2skQiSvxiRvTaPAZI7tp6TjkjIB/UlAOfnoq1+hCycagW1xB tggSOJldLnCeeFN/So+uvidmGnKUh934qYwk405FIr7zcKtpmN2NaDZP09Ta+U3NwvVb soJA9wq1mKKxIBsHD0kIpwSDZsDv3I3rGhyuIfhzQN0Zmkj625nfQaT3KuXUI2tX3ad7 iFUzDpNRThURDqKixQS1cyUalMcoASH4290MG9kBLBHn5ZfIFKSGAOtbr1pNaqOh9jVq nkFw== X-Forwarded-Encrypted: i=1; AL+hErFDfy7gtUs+S4KvIydDjdP+pA+/q9UZwCFCoQg1U+K6si7G5lVZjkD2fKfH+ThrsH112X8yp37JGiXSbtE=@vger.kernel.org X-Gm-Message-State: APuU4Z9v4drbf9QCUHWQ4Ufo0FTev6FuoILN5zE8MZ4hMIqeovO1dfCi 4AiH1iyCiyIoCgKQVz+YDl3Y4GhFn7yiIdG7EAYxNQK/Csf/FLIJJs1yIXzHmYGyJsEsIURRQTw VSvJeDn/sZpV1WNWy3YsSLnKfooRqkx7kUVD5+usAAJboDSjFwtOM/3ZckoQ= 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:c168:b0:4b9:e6ab:d07b with SMTP id 5614622812f47-57a0a40a176mr30278971b6e.27.1795944018790; Sun, 29 Nov 2026 01:20:18 -0800 (PST) Date: Sun, 29 Nov 2026 01:20:18 -0800 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <6b0bee52.b0baff64.3572de.01bc.GAE@google.com> Subject: [syzbot] [scsi?] WARNING in free_percpu From: syzbot To: James.Bottomley@HansenPartnership.com, hare@suse.de, 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: 8d7fe9885c62 Merge tag 'hid-for-linus-2026112301' of git:/.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=15809b09580000 kernel config: https://syzkaller.appspot.com/x/.config?x=1cf189394a856f11 dashboard link: https://syzkaller.appspot.com/bug?extid=4138704b4276d9a57251 compiler: gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44 Unfortunately, I don't have any reproducer for this issue yet. Downloadable assets: disk image: https://storage.googleapis.com/syzbot-assets/940496b3bc81/disk-8d7fe988.raw.xz vmlinux: https://storage.googleapis.com/syzbot-assets/2529ca02613a/vmlinux-8d7fe988.xz kernel image: https://storage.googleapis.com/syzbot-assets/97cf161a9f0d/bzImage-8d7fe988.xz 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=9d4aee9e-face-40dc-b232-714c95f1928b AI-generated root cause summary: In `sbitmap_init_node()` (`lib/sbitmap.c`), if `init_alloc_hint()` succeeds in allocating `sb->alloc_hint` via `alloc_percpu_gfp()` and the subsequent `kvzalloc_node()` for `sb->map` fails, the error path calls `free_percpu(sb->alloc_hint)` without resetting `sb->alloc_hint` to `NULL`. When `scsi_alloc_sdev()` (`drivers/scsi/scsi_scan.c`) fails in `scsi_realloc_sdev_budget_map()`, it tears down the device via `__scsi_remove_device()`, which drops the final device reference and invokes `scsi_device_dev_release()` -> `sbitmap_free(&sdev->budget_map)`. Because `sdev->budget_map.alloc_hint` still holds the dangling pointer to the already-freed per-CPU area, `sbitmap_free()` calls `free_percpu()` on it a second time, triggering the `WARN_ON_ONCE(1)` in `free_percpu()` (`mm/percpu.c`). full analysis: https://syzkaller.appspot.com/x/ai_root_cause?x=4138704b4276d9a57251 IMPORTANT: if you fix the issue, please add the following tag to the commit: Reported-by: syzbot+4138704b4276d9a57251@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") ------------[ cut here ]------------ 1 WARNING: mm/percpu.c:2262 at free_percpu mm/percpu.c:2262 [inline], CPU#1: syz.9.1840/15973 WARNING: mm/percpu.c:2262 at free_percpu+0x7cd/0x1510 mm/percpu.c:2239, CPU#1: syz.9.1840/15973 Modules linked in: CPU: 1 UID: 0 PID: 15973 Comm: syz.9.1840 Tainted: G L syzkaller #0 PREEMPT(full) Tainted: [L]=SOFTLOCKUP 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 34 bf a9 ff 48 8b 34 24 48 c7 c7 40 14 1a 90 e8 34 99 90 09 90 <0f> 0b 90 e9 46 ff ff ff e8 16 bf a9 ff 48 3b 1d 1f fa 2a 0c 0f 84 RSP: 0018:ffffc9000543f548 EFLAGS: 00010286 RAX: 8000000000000001 RBX: ffff888023a82400 RCX: 0000000000000000 RDX: 0000000000000004 RSI: ffffffff8e62d962 RDI: 0000000000000001 RBP: 0000000000008c98 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000001 R11: 0000000000000000 R12: 0000607edd7a7c98 R13: 0000000000000000 R14: ffff888023a82480 R15: 0000000000008c98 FS: 00007f0d6dfb46c0(0000) GS:ffff888122561000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000200000007000 CR3: 000000005a0c3000 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_write+0x12a/0x250 fs/read_write.c:719 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:0x7f0d6d1a9a19 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f0d6dfb4028 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f0d6d435fa0 RCX: 00007f0d6d1a9a19 RDX: 0000000000000005 RSI: 00002000000004c0 RDI: 0000000000000007 RBP: 00007f0d6d239156 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f0d6d436038 R14: 00007f0d6d435fa0 R15: 00007ffd731f8988 --- 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