git.samba.org
/
sfrench
/
cifs-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[sfrench/cifs-2.6.git]
/
drivers
/
infiniband
/
hw
/
ipath
/
ipath_qp.c
diff --git
a/drivers/infiniband/hw/ipath/ipath_qp.c
b/drivers/infiniband/hw/ipath/ipath_qp.c
index 6a41fdbc8e57dfca779759de14137fe33b811015..80dc623cee403637c5d828cc33a519204b869b1d 100644
(file)
--- a/
drivers/infiniband/hw/ipath/ipath_qp.c
+++ b/
drivers/infiniband/hw/ipath/ipath_qp.c
@@
-387,8
+387,8
@@
int ipath_error_qp(struct ipath_qp *qp, enum ib_wc_status err)
struct ib_wc wc;
int ret = 0;
struct ib_wc wc;
int ret = 0;
- ipath_dbg("QP%d/%d in error state\n",
- qp->ibqp.qp_num, qp->remote_qpn);
+ ipath_dbg("QP%d/%d in error state
(%d)
\n",
+ qp->ibqp.qp_num, qp->remote_qpn
, err
);
spin_lock(&dev->pending_lock);
/* XXX What if its already removed by the timeout code? */
spin_lock(&dev->pending_lock);
/* XXX What if its already removed by the timeout code? */
@@
-835,7
+835,8
@@
struct ib_qp *ipath_create_qp(struct ib_pd *ibpd,
init_attr->qp_type);
if (err) {
ret = ERR_PTR(err);
init_attr->qp_type);
if (err) {
ret = ERR_PTR(err);
- goto bail_rwq;
+ vfree(qp->r_rq.wq);
+ goto bail_qp;
}
qp->ip = NULL;
ipath_reset_qp(qp);
}
qp->ip = NULL;
ipath_reset_qp(qp);
@@
-854,8
+855,6
@@
struct ib_qp *ipath_create_qp(struct ib_pd *ibpd,
* See ipath_mmap() for details.
*/
if (udata && udata->outlen >= sizeof(__u64)) {
* See ipath_mmap() for details.
*/
if (udata && udata->outlen >= sizeof(__u64)) {
- int err;
-
if (!qp->r_rq.wq) {
__u64 offset = 0;
if (!qp->r_rq.wq) {
__u64 offset = 0;
@@
-863,7
+862,7
@@
struct ib_qp *ipath_create_qp(struct ib_pd *ibpd,
sizeof(offset));
if (err) {
ret = ERR_PTR(err);
sizeof(offset));
if (err) {
ret = ERR_PTR(err);
- goto bail_
rwq
;
+ goto bail_
ip
;
}
} else {
u32 s = sizeof(struct ipath_rwq) +
}
} else {
u32 s = sizeof(struct ipath_rwq) +
@@
-875,7
+874,7
@@
struct ib_qp *ipath_create_qp(struct ib_pd *ibpd,
qp->r_rq.wq);
if (!qp->ip) {
ret = ERR_PTR(-ENOMEM);
qp->r_rq.wq);
if (!qp->ip) {
ret = ERR_PTR(-ENOMEM);
- goto bail_
rwq
;
+ goto bail_
ip
;
}
err = ib_copy_to_udata(udata, &(qp->ip->offset),
}
err = ib_copy_to_udata(udata, &(qp->ip->offset),
@@
-907,9
+906,11
@@
struct ib_qp *ipath_create_qp(struct ib_pd *ibpd,
goto bail;
bail_ip:
goto bail;
bail_ip:
- kfree(qp->ip);
-bail_rwq:
- vfree(qp->r_rq.wq);
+ if (qp->ip)
+ kref_put(&qp->ip->ref, ipath_release_mmap_info);
+ else
+ vfree(qp->r_rq.wq);
+ ipath_free_qp(&dev->qp_table, qp);
bail_qp:
kfree(qp);
bail_swq:
bail_qp:
kfree(qp);
bail_swq: