]> git.openfabrics.org - ~shefty/librdmacm.git/commitdiff
import
authorSean Hefty <sean.hefty@intel.com>
Tue, 9 Oct 2012 16:54:25 +0000 (09:54 -0700)
committerSean Hefty <sean.hefty@intel.com>
Tue, 9 Oct 2012 16:54:25 +0000 (09:54 -0700)
meta
patches/1-5-librdmacm-rsocket-add-miss [new file with mode: 0644]
patches/2-5-librdmacm-rsocket-added-mi [new file with mode: 0644]
patches/3-5-librdmacm-rstream-initiali [new file with mode: 0644]
patches/4-5-librdmacm-rstream-added-mi [new file with mode: 0644]
patches/5-5-librdmacm-rping-added-chec [new file with mode: 0644]

diff --git a/meta b/meta
index fec497260956a923982c70d78f07fa9ebfb8fcd5..cf59303d519254f6d3fc9a986aed8f0b28fff97a 100644 (file)
--- a/meta
+++ b/meta
@@ -1,7 +1,12 @@
 Version: 1
-Previous: eafbd5fa85cbcf1be3a7f54b6099ae4ac92feb15
-Head: 8a92d0c3c8ce5f513dff974912143f6b0283f8e3
+Previous: 7965e574b2687a0e7d63bbe1730fc524cf89412b
+Head: 62a796f72dbcb7cd08124f4a2b96bef75a803a9a
 Applied:
+  1-5-librdmacm-rsocket-add-miss: c8e91e418291c3d29337e169b0ff6039e1b24072
+  2-5-librdmacm-rsocket-added-mi: 6841eb657a1999eb0b9fe868ef655c3176458172
+  3-5-librdmacm-rstream-initiali: 6edbcb82d7a5345c2337472285f2015501562dae
+  4-5-librdmacm-rstream-added-mi: 9b1271effaff9251b5d331167e6cf820fc082f69
+  5-5-librdmacm-rping-added-chec: 62a796f72dbcb7cd08124f4a2b96bef75a803a9a
 Unapplied:
   acm-port: 4b5c1aa734e0e734fc2ba3cd41d0ddf02170af6d
   af-ib-conn: 70cdbcec6986d1fcc8146a73cf2d8b6a537e71f5
diff --git a/patches/1-5-librdmacm-rsocket-add-miss b/patches/1-5-librdmacm-rsocket-add-miss
new file mode 100644 (file)
index 0000000..7b48a2f
--- /dev/null
@@ -0,0 +1,27 @@
+Bottom: 7a63e115cc4adf073292cd3edca568d9910e1a6e
+Top:    f645979e703e3337aa2e7456b7e1742bc602ce6a
+Author: Dotan Barak <dotanb@dev.mellanox.co.il>
+Date:   2012-10-09 12:27:48 +0000
+
+[1/5,librdmacm] rsocket: add missing va_end() after calling va_end()
+
+Not doing so, may lead to resource leak.
+
+Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
+Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
+
+
+---
+
+diff --git a/src/rsocket.c b/src/rsocket.c
+index 4c4821b..278c8ec 100644
+--- a/src/rsocket.c
++++ b/src/rsocket.c
+@@ -2002,6 +2002,7 @@ int rfcntl(int socket, int cmd, ... /* arg */ )
+       va_start(args, cmd);
+       switch (cmd) {
+       case F_GETFL:
++              va_end(args);
+               return (int) rs->fd_flags;
+       case F_SETFL:
+               param = va_arg(args, long);
diff --git a/patches/2-5-librdmacm-rsocket-added-mi b/patches/2-5-librdmacm-rsocket-added-mi
new file mode 100644 (file)
index 0000000..e3ea176
--- /dev/null
@@ -0,0 +1,25 @@
+Bottom: f645979e703e3337aa2e7456b7e1742bc602ce6a
+Top:    39eb51ceb9f5ecf9dded46d0c3dd62f5e135e41d
+Author: Dotan Barak <dotanb@dev.mellanox.co.il>
+Date:   2012-10-09 12:27:49 +0000
+
+[2/5,librdmacm] rsocket: added missing break
+
+Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
+Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
+
+
+---
+
+diff --git a/src/rsocket.c b/src/rsocket.c
+index 278c8ec..4665ce7 100644
+--- a/src/rsocket.c
++++ b/src/rsocket.c
+@@ -1859,6 +1859,7 @@ int rsetsockopt(int socket, int level, int optname,
+               default:
+                       break;
+               }
++              break;
+       case SOL_RDMA:
+               if (rs->state >= rs_opening) {
+                       ret = ERR(EINVAL);
diff --git a/patches/3-5-librdmacm-rstream-initiali b/patches/3-5-librdmacm-rstream-initiali
new file mode 100644 (file)
index 0000000..6ab1bbf
--- /dev/null
@@ -0,0 +1,29 @@
+Bottom: 39eb51ceb9f5ecf9dded46d0c3dd62f5e135e41d
+Top:    3c34d14a8ee4fe283d218672455efc104f3a737a
+Author: Dotan Barak <dotanb@dev.mellanox.co.il>
+Date:   2012-10-09 12:27:50 +0000
+
+[3/5,librdmacm] rstream: initialize return value in server_connect()
+
+If use_async == 0 and rs_accept() passes (i.e. non negative value), then
+the return value from the function was uninitialized.
+
+Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
+Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
+
+
+---
+
+diff --git a/examples/rstream.c b/examples/rstream.c
+index 1d221d0..6ef60a1 100644
+--- a/examples/rstream.c
++++ b/examples/rstream.c
+@@ -444,7 +444,7 @@ free:
+ static int server_connect(void)
+ {
+       struct pollfd fds;
+-      int ret;
++      int ret = 0;
+       set_options(lrs);
+       do {
diff --git a/patches/4-5-librdmacm-rstream-added-mi b/patches/4-5-librdmacm-rstream-added-mi
new file mode 100644 (file)
index 0000000..3abdd83
--- /dev/null
@@ -0,0 +1,25 @@
+Bottom: 3c34d14a8ee4fe283d218672455efc104f3a737a
+Top:    17bcaa3096671f47384b47a6f4ce7f1e041dfd73
+Author: Dotan Barak <dotanb@dev.mellanox.co.il>
+Date:   2012-10-09 12:27:51 +0000
+
+[4/5,librdmacm] rstream: added missing return is accept() failed
+
+Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
+Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
+
+
+---
+
+diff --git a/examples/rstream.c b/examples/rstream.c
+index 6ef60a1..d65c48d 100644
+--- a/examples/rstream.c
++++ b/examples/rstream.c
+@@ -464,6 +464,7 @@ static int server_connect(void)
+       if (rs < 0) {
+               ret = rs;
+               perror("raccept");
++              return ret;
+       }
+       if (use_fork)
diff --git a/patches/5-5-librdmacm-rping-added-chec b/patches/5-5-librdmacm-rping-added-chec
new file mode 100644 (file)
index 0000000..20c617c
--- /dev/null
@@ -0,0 +1,69 @@
+Bottom: 17bcaa3096671f47384b47a6f4ce7f1e041dfd73
+Top:    d2e0cf1d12bba54243ad83d2a5c20fe5559cf757
+Author: Dotan Barak <dotanb@dev.mellanox.co.il>
+Date:   2012-10-09 12:27:52 +0000
+
+[5/5,librdmacm] rping: added checks to the return values functions
+
+This will make rping to exit with return value other than zero in case of an
+error.
+
+Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
+Reviewed-by: Yishai Hadas <yishaih@mellanox.com>
+
+
+---
+
+diff --git a/examples/rping.c b/examples/rping.c
+index 32bd70a..d702592 100644
+--- a/examples/rping.c
++++ b/examples/rping.c
+@@ -881,7 +881,14 @@ static int rping_run_server(struct rping_cb *cb)
+               goto err2;
+       }
+-      rping_test_server(cb);
++      ret = rping_test_server(cb);
++      if (ret) {
++              fprintf(stderr, "rping server failed: %d\n", ret);
++              goto err3;
++      }
++
++      ret = 0;
++err3:
+       rdma_disconnect(cb->child_cm_id);
+       pthread_join(cb->cqthread, NULL);
+       rdma_destroy_id(cb->child_cm_id);
+@@ -1049,7 +1056,14 @@ static int rping_run_client(struct rping_cb *cb)
+               goto err2;
+       }
+-      rping_test_client(cb);
++      ret = rping_test_client(cb);
++      if (ret) {
++              fprintf(stderr, "rping client failed: %d\n", ret);
++              goto err3;
++      }
++
++      ret = 0;
++err3:
+       rdma_disconnect(cb->cm_id);
+       pthread_join(cb->cqthread, NULL);
+ err2:
+@@ -1189,6 +1203,7 @@ int main(int argc, char *argv[])
+       cb->cm_channel = rdma_create_event_channel();
+       if (!cb->cm_channel) {
+               perror("rdma_create_event_channel");
++              ret = ENOMEM;
+               goto out;
+       }
+@@ -1210,7 +1225,7 @@ int main(int argc, char *argv[])
+               ret = rping_run_client(cb);
+       DEBUG_LOG("destroy cm_id %p\n", cb->cm_id);
+-      rdma_destroy_id(cb->cm_id);
++      ret = rdma_destroy_id(cb->cm_id);
+ out2:
+       rdma_destroy_event_channel(cb->cm_channel);
+ out: