Re: [PATCH v2] usb: ucsi: fix connector partner ucsi work issue

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

 



Hi,

On Thu, Jan 05, 2023 at 01:42:40PM +0800, Linyu Yuan wrote:
> When a PPM client unregisters with UCSI framework, connector specific work
> queue is destroyed. However, a pending delayed work queued before may
> still exist. Once the delay timer expires and the work is scheduled,
> this can cause a system crash as the workqueue is destroyed already.

When the workqueue is destroyed it's also flushed, no? So how could
there be still something pending, delayed or not? Did you actually see
this happening?

> Fix this by moving all partner related delayed work to connector instance
> and cancel all of them when ucsi_unregister() is called by PPM client.

I would love to be able to cancel these works, though not because of
driver removal - I'm more concerned about disconnections. The reason
why each task is a unique work is because it allows the driver to add
the same task to the queue as many times as needed, and that was
needed inorder to recover from some firmware issues. If there's only a
dedicated work per task like in your proposal, we can only schedule
the task once at a time, and that may lead into other issues.

But first things first. Is the problem that you are describing here a
real problem that can actually happen?

thanks,

-- 
heikki



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

  Powered by Linux