xpp: stability -- deadlock in waitfor_xpds()
waitfor_xpds xbus sysfs file should not take an xbus refcount: * It is called from sysfs which maintain its own device refcount. * If put_xbus() calls xbus_destroy() than down the call chain it will try to release an object that is held by sysfs. * This will create a deadlock. Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
This commit is contained in:
committed by
Tzafrir Cohen
parent
235d530fee
commit
db07e1b74d
@@ -1640,10 +1640,6 @@ int waitfor_xpds(xbus_t *xbus, char *buf)
|
||||
* FIXME: worker is created before ?????
|
||||
* So by now it exists and initialized.
|
||||
*/
|
||||
/* until end of waitfor_xpds_show(): */
|
||||
xbus = get_xbus(__func__, xbus->num);
|
||||
if (!xbus)
|
||||
return -ENODEV;
|
||||
worker = &xbus->worker;
|
||||
BUG_ON(!worker);
|
||||
if (!worker->wq) {
|
||||
@@ -1682,7 +1678,6 @@ int waitfor_xpds(xbus_t *xbus, char *buf)
|
||||
spin_unlock_irqrestore(&xbus->lock, flags);
|
||||
}
|
||||
out:
|
||||
put_xbus(__func__, xbus); /* from start of waitfor_xpds_show() */
|
||||
return len;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user