mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 14:42:24 +00:00
Fifth pull request for 4.15-rc
- Oops fix in hfi1 driver - Use-after-free issue in iser-target - Use of user supplied array index without proper checking -----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJaXnN2AAoJELgmozMOVy/dyYAP/3YBi6ofVHrIjKovrsA6fh+y O1+YuG++2glgKF1QuZkZnrKqrJUIueHhGuKce2rRgWWMioAzOfd1mbXbwha3xKWh 4mH/BK/fv1k/TZy+eu6w4WMnjtExVinPp4qeSwvvfHh3BpJfnBOtPbYNdPVt94MV QYPZuLarvSIJe8MFDbv6yitAIQWnPQLfGMWPW8OZb0ut7bsMNPyZ8LvcAXhfXA4a tVuxAfCqUb90BHWOnCBcaWGNpp9Ov2w6yyNCDkiIRXvgJxhjvJwxpHze6TMa4fCo mv8e4QDdQ8KK2vQaINQAJTl68Y1/fPxtI8um5tpIhJ5YjQE3rrVzTaQJRstBcXXs ViiDmxm/4KTUTeFtWHRj7oVJTZNSOBu+FfBVmjqtcUl4k+t9tDfj2Lw/ZVXT/3KQ +dsqUV+1PrQspCeFlKwg+e1mgXa3miyOYvMPacAHzRYBLv5oU6MPpb+WHbZMlTMt duT50JfjseIB0s6F2aGLNRRXPWb9jVUwHwzOXaDGKwX1+5u6O2IKeUP7+15TgZsS IFeLPodNN8W1N1z0TGcGL8zRXtY9GYhlYwrdMUe/4EWfxrrRtawLLCGGVhWKk/Rv iPl/Qpxj/8f2DS0A5+N5iHTAZPoOXjNx6JtZf9AZhvI9blvwZVuGdr63mKZMUnpb a0xeypv1bnYbv7k70zS8 =MHNK -----END PGP SIGNATURE----- Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma Pull rdma fixes from Doug Ledford: "We had a few more items creep up over the last week. Given we are in -rc8, these are obviously limited to bugs that have a big downside and for which we are certain of the fix. The first is a straight up oops bug that all you have to do is read the code to see it's a guaranteed 100% oops bug. The second is a use-after-free issue. We get away lucky if the queue we are shutting down is empty, but if it isn't, we can end up oopsing. We really need to drain the queue before destroying it. The final one is an issue with bad user input causing us to access our port array out of bounds. While fixing the array out of bounds issue, it was noticed that the original code did the same thing twice (the call to rdma_ah_set_port_num()), so its removal is not balanced by a readd elsewhere, it was already where it needed to be in addition to where it didn't need to be. Summary: - Oops fix in hfi1 driver - use-after-free issue in iser-target - use of user supplied array index without proper checking" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: RDMA/mlx5: Fix out-of-bound access while querying AH IB/hfi1: Prevent a NULL dereference iser-target: Fix possible use-after-free in connection establishment error
This commit is contained in:
commit
8cbab92dff
@ -763,11 +763,11 @@ static int complete_subctxt(struct hfi1_filedata *fd)
|
||||
}
|
||||
|
||||
if (ret) {
|
||||
hfi1_rcd_put(fd->uctxt);
|
||||
fd->uctxt = NULL;
|
||||
spin_lock_irqsave(&fd->dd->uctxt_lock, flags);
|
||||
__clear_bit(fd->subctxt, fd->uctxt->in_use_ctxts);
|
||||
spin_unlock_irqrestore(&fd->dd->uctxt_lock, flags);
|
||||
hfi1_rcd_put(fd->uctxt);
|
||||
fd->uctxt = NULL;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -4362,12 +4362,11 @@ static void to_rdma_ah_attr(struct mlx5_ib_dev *ibdev,
|
||||
|
||||
memset(ah_attr, 0, sizeof(*ah_attr));
|
||||
|
||||
ah_attr->type = rdma_ah_find_type(&ibdev->ib_dev, path->port);
|
||||
rdma_ah_set_port_num(ah_attr, path->port);
|
||||
if (rdma_ah_get_port_num(ah_attr) == 0 ||
|
||||
rdma_ah_get_port_num(ah_attr) > MLX5_CAP_GEN(dev, num_ports))
|
||||
if (!path->port || path->port > MLX5_CAP_GEN(dev, num_ports))
|
||||
return;
|
||||
|
||||
ah_attr->type = rdma_ah_find_type(&ibdev->ib_dev, path->port);
|
||||
|
||||
rdma_ah_set_port_num(ah_attr, path->port);
|
||||
rdma_ah_set_sl(ah_attr, path->dci_cfi_prio_sl & 0xf);
|
||||
|
||||
|
@ -741,6 +741,7 @@ isert_connect_error(struct rdma_cm_id *cma_id)
|
||||
{
|
||||
struct isert_conn *isert_conn = cma_id->qp->qp_context;
|
||||
|
||||
ib_drain_qp(isert_conn->qp);
|
||||
list_del_init(&isert_conn->node);
|
||||
isert_conn->cm_id = NULL;
|
||||
isert_put_conn(isert_conn);
|
||||
|
Loading…
Reference in New Issue
Block a user