When output buffer is too small, others infiniband functions returns
ENOSPC.
This patch changes ib_ucm_event() to returns ENOSPC just like others
functions.

Signed-off-by: Yann Droneaud <[email protected]>
Link: http://mid.gmane.org/[email protected]
---
 drivers/infiniband/core/ucm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/core/ucm.c b/drivers/infiniband/core/ucm.c
index f2f6393..e462208 100644
--- a/drivers/infiniband/core/ucm.c
+++ b/drivers/infiniband/core/ucm.c
@@ -432,7 +432,7 @@ static ssize_t ib_ucm_event(struct ib_ucm_file *file,
 
        if (uevent->data) {
                if (cmd.data_len < uevent->data_len) {
-                       result = -ENOMEM;
+                       result = -ENOSPC;
                        goto done;
                }
                if (copy_to_user((void __user *)(unsigned long)cmd.data,
@@ -444,7 +444,7 @@ static ssize_t ib_ucm_event(struct ib_ucm_file *file,
 
        if (uevent->info) {
                if (cmd.info_len < uevent->info_len) {
-                       result = -ENOMEM;
+                       result = -ENOSPC;
                        goto done;
                }
                if (copy_to_user((void __user *)(unsigned long)cmd.info,
-- 
1.8.3.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to