Re: [PATCH 1/3] SUNRPC: Ensure that we free the rpc_task after cleanups are done

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

 



On Fri, Jan 04, 2013 at 01:15:00PM -0500, Trond Myklebust wrote:
> This patch ensures that we free the rpc_task after the cleanup callbacks
> are done in order to avoid a deadlock problem that can be triggered if
> the callback needs to wait for another workqueue item to complete.
> 
> Signed-off-by: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx>
> Cc: Weston Andros Adamson <dros@xxxxxxxxxx>
> Cc: Tejun Heo <tj@xxxxxxxxxx>
> Cc: Bruce Fields <bfields@xxxxxxxxxxxx>
> Cc: stable@xxxxxxxxxxxxxxx

Acked-by: Tejun Heo <tj@xxxxxxxxxx>

> + * Tejun Heo states:
> + * "Workqueue currently considers two work items to be the same if they're
> + * on the same address and won't execute them concurrently - ie. it
> + * makes a work item which is queued again while being executed wait
> + * for the previous execution to complete.
> + *
> + * If a work function frees the work item, and then waits for an event
> + * which should be performed by another work item and *that* work item
> + * recycles the freed work item, it can create a false dependency loop.
> + * There really is no reliable way to detect this short of verifying
> + * every memory free."

I will document it in Documentation/workqueue.txt.

Thanks!

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


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux