[PATCH] shorten workqueue name length

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

 



A customer passed this fix to me...

In a system with double-digit adapter counts, after a few
rmmod/insmod attempts, the system oops. It always occurs when
the scsi host number reaches 100.

What is happening is that scsi_add_host() detects a transport that
needs to allocate a workqueue, thus calls create_singlethread_workqueue().
It hits a BUG_ON() in kernel/workqueue.c:__create_workqueue() which
ensures the length of the name for the workqueue is 10 characters or less.
As the name is "scsi_wq_100", we have exceeded the 10 character max.

I assume there's good reason for the name to be 10 or less. So what I've
done is shorten the name for the workqueue. Should work until the host number
reaches 10000.

-- James S

--- scsi-misc-2.6.20050808/drivers/scsi/hosts.c	2005-08-08 16:25:30.000000000 -0400
+++ scsi-misc-2.6.20050808/drivers/scsi/hosts.c.new	2005-08-09 11:55:06.000000000 -0400
@@ -191,7 +191,7 @@ int scsi_add_host(struct Scsi_Host *shos
 		goto out_del_classdev;
 
 	if (shost->transportt->create_work_queue) {
-		snprintf(shost->work_q_name, KOBJ_NAME_LEN, "scsi_wq_%d",
+		snprintf(shost->work_q_name, KOBJ_NAME_LEN, "scsiwq%d",
 			shost->host_no);
 		shost->work_q = create_singlethread_workqueue(
 					shost->work_q_name);
-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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