Re: [PATCH 1] Cc: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>

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

 



On 12/22/09 11:27, Somebody in the thread at some point said:

Hi Oliver -

Am Dienstag, 22. Dezember 2009 11:04:52 schrieb Andy Green:
+       mutex_lock(&arbitration_wait_mutex);
+
+       sprintf(buf, "REQUEST_ARBITRATION=%s",
+                                             mod_data.file[curlun->lun_index]);
+       envp[0] = buf;
+       envp[1] = NULL;
+       kobject_uevent_env(&curlun->dev.kobj, KOBJ_CHANGE, envp);
+       sysfs_notify(&curlun->dev.kobj, NULL, "arbitration");
+
+       INIT_COMPLETION(curlun->arbitration_completion);
+       ret = wait_for_completion_interruptible_timeout(
+&curlun->arbitration_completion, HZ * 5);

You race. The completion must be ready before you trigger an event.

Ouch, good point.

I'll wait a bit in case of more comments then reissue with these swapped. Maybe even a workable email title :-O

-Andy
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux