projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
RDS: verify the underlying transport exists before creating a connection
[firefly-linux-kernel-4.4.55.git]
/
net
/
rds
/
connection.c
diff --git
a/net/rds/connection.c
b/net/rds/connection.c
index 9b2de5e67d7951a76be6d8c23048b906afe810a7..49adeef8090caea90be3e42702276314bca1d118 100644
(file)
--- a/
net/rds/connection.c
+++ b/
net/rds/connection.c
@@
-190,6
+190,12
@@
new_conn:
}
}
+ if (trans == NULL) {
+ kmem_cache_free(rds_conn_slab, conn);
+ conn = ERR_PTR(-ENODEV);
+ goto out;
+ }
+
conn->c_trans = trans;
ret = trans->conn_alloc(conn, gfp);