Skip to content

Commit d074695

Browse files
shayshyiintel-lab-lkp
authored andcommitted
IB/umad: Return EIO in case of when device disassociated
MAD message received by the user has EINVAL error in all flows including when the device is disassociated. That makes it impossible for the applications to treat such flow differently. Change it to return EIO, so the applications will be able to perform disassociation recovery. Fixes: 1da177e ("Linux-2.6.12-rc2") Signed-off-by: Shay Drory <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]>
1 parent cbabea8 commit d074695

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/infiniband/core/user_mad.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ static ssize_t ib_umad_write(struct file *filp, const char __user *buf,
524524

525525
agent = __get_agent(file, packet->mad.hdr.id);
526526
if (!agent) {
527-
ret = -EINVAL;
527+
ret = -EIO;
528528
goto err_up;
529529
}
530530

0 commit comments

Comments
 (0)