locking, reset, memory allocations and deadlocks

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

 



Hi,

Ming Lei made me look. I found a scenario I don't like.
Suppose we have a device with two interfaces #1 and #0
Let #1 be storage and #0 be vendor specific and the skeleton driver bound to it.


CPU A																	CPU B

skel_read()
mutex_lock_interruptible(&dev->io_mutex)
copy_to_user(...)
page fault
schedule reading a page from interface #0
																		usb_stor_port_reset()
																		usb_reset_device()
																		drv->pre_reset()
																		skel_pre_reset()
																		mutex_lock(&dev->io_mutex)

Contrary to the usual scenario you don't need writable mmap. In fact it could happen with a scratched CD.
What do you think?

	Regards
		Oliver

--
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