Re: sysfs: cannot create duplicate filename \'/devices/virtual/workqueue/scsi_tmf_-1072727056\''

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8/20/24 2:25 AM, V, Narasimhan wrote:
There is a boot warning with next-20240814, and reproduced till today's build.

[ 8.436312] scsi host0: ahci'
[ 8.439760] sysfs: cannot create duplicate filename \'/devices/virtual/workqueue/scsi_tmf_-1072727056\''
[ 8.450058] CPU: 0 UID: 0 PID: 9 Comm: kworker/0:1 Not tainted 6.11.0-rc3-next-20240814-1723624235760 #1'
[ 8.460637] Hardware name: AMD Corporation Shale96/Shale96, BIOS RSH100BD 12/11/2023'
[ 8.469275] Workqueue: events work_for_cpu_fn'
[ 8.474137] Call Trace:'
[ 8.476862] <TASK>'
[ 8.479199] dump_stack_lvl+0x70/0x90'
[ 8.483284] dump_stack+0x14/0x20'
[ 8.486978] sysfs_warn_dup+0x60/0x80'
[ 8.491061] sysfs_create_dir_ns+0xc0/0xe0'
[ 8.495626] kobject_add_internal+0xb1/0x2f0'
[ 8.500387] kobject_add+0x7e/0xf0'
[ 8.504177] ? srso_alias_return_thunk+0x5/0xfbef5'
[ 8.509519] ? get_device_parent+0x10e/0x1e0'
[ 8.514283] device_add+0x125/0x870'
[ 8.518171] ? srso_alias_return_thunk+0x5/0xfbef5'
[ 8.523513] ? hrtimer_init+0x2c/0x80'
[ 8.527597] device_register+0x1f/0x30'
[ 8.531776] workqueue_sysfs_register+0x91/0x140'
[ 8.536924] __alloc_workqueue+0x61b/0x7c0'
[ 8.541491] ? srso_alias_return_thunk+0x5/0xfbef5'
[ 8.546835] alloc_workqueue+0x52/0x70'
[ 8.551014] scsi_host_alloc+0x398/0x490'
[ 8.555391] ata_scsi_add_hosts+0xc2/0x140'
[ 8.559961] ata_host_register.part.0+0x93/0x250'
[ 8.565110] ata_host_register+0x35/0x60'
[ 8.569482] ahci_host_activate+0x145/0x190 [libahci]'
[ 8.575118] ahci_init_one+0xdcc/0x1050 [ahci]'
[ 8.580077] local_pci_probe+0x4c/0xb0'
[ 8.584256] work_for_cpu_fn+0x1b/0x30'
[ 8.588434] process_one_work+0x17a/0x3b0'
[ 8.592904] ? __pfx_worker_thread+0x10/0x10'
[ 8.597666] worker_thread+0x2a0/0x3a0'
[ 8.601848] ? __pfx_worker_thread+0x10/0x10'
[ 8.606608] kthread+0xe5/0x120'
[ 8.610107] ? __pfx_kthread+0x10/0x10'
[ 8.614286] ret_from_fork+0x3d/0x60'
[ 8.618271] ? __pfx_kthread+0x10/0x10'
[ 8.622449] ret_from_fork_asm+0x1a/0x30'
[ 8.626826] </TASK>'

It's not clear to me how this can happen. scsi_host_alloc() generates
the workqueue name as follows:

	shost->tmf_work_q = alloc_workqueue("scsi_tmf_%d",
				WQ_UNBOUND | WQ_MEM_RECLAIM | WQ_SYSFS,
				1, shost->host_no);

shost->host_no is set as follows:

	index = ida_alloc(&host_index_ida, GFP_KERNEL);
	if (index < 0) {
		kfree(shost);
		return NULL;
	}
	shost->host_no = index;

and 'index' has a signed type. So it's not clear to me how a negative
number can end up in the tmf workqueue name. Am I perhaps overlooking
something?

Thanks,

Bart.




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux