[PATCH 1/3] drivers: base: Support atomic version of attribute_container_device_trigger

2020-01-06 Thread Gabriel Krisman Bertazi
attribute_container_device_trigger invokes callbacks that may fail for one or more classdev's, for instance, the transport_add_class_device callback, called during transport creation, does memory allocation. This information, though, is not propagated to upper layers, and any driver using the attri

[PATCH 2/3] drivers: base: Propagate errors through the transport component

2020-01-06 Thread Gabriel Krisman Bertazi
The transport registration may fail. Make sure the errors are propagated to the callers. Signed-off-by: Gabriel Krisman Bertazi --- drivers/base/transport_class.c | 11 --- include/linux/transport_class.h | 6 +++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/driv

[PATCH 0/3] drivers base: transport component error propagation

2020-01-06 Thread Gabriel Krisman Bertazi
Hi, This small series improves error propagation on the transport component to prevent an inconsistent state in the iscsi module. The bug that motivated this patch results in a hanging iscsi connection that cannot be used or removed by userspace, since the session is in an inconsistent state. Th

[PATCH 3/3] iscsi: Fail session and connection on transport registration failure

2020-01-06 Thread Gabriel Krisman Bertazi
If the transport cannot be registered, the session/connection creation needs to be failed early to let the initiator know. Otherwise, the system will have an outstanding connection that cannot be used nor removed by open-iscsi. The result is similar to the error below, triggered by injecting a fai