diff options
author | Leon Romanovsky <leonro@mellanox.com> | 2019-10-29 08:27:37 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-11-06 15:55:22 -0400 |
commit | dd0b0159f7b31439679879fcf2574d7ad744b6f1 (patch) | |
tree | e1d7ca6a00e06eca9073d1e1d389b9dfc4e83c0f /drivers/infiniband/hw/qib/qib_mad.c | |
parent | 6a42265c9116a2ff8b94b52525c95f177cb15db2 (diff) |
RDMA/mad: Do not check MAD sizes in roce and ib drivers
All callers for process_mad allocate MAD structures with proper sizes,
there is no need to recheck it.
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/qib/qib_mad.c')
-rw-r--r-- | drivers/infiniband/hw/qib/qib_mad.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/infiniband/hw/qib/qib_mad.c b/drivers/infiniband/hw/qib/qib_mad.c index 6fbba0d54269..b259aaf85d4a 100644 --- a/drivers/infiniband/hw/qib/qib_mad.c +++ b/drivers/infiniband/hw/qib/qib_mad.c @@ -2396,10 +2396,6 @@ int qib_process_mad(struct ib_device *ibdev, int mad_flags, u8 port, const struct ib_mad *in_mad = (const struct ib_mad *)in; struct ib_mad *out_mad = (struct ib_mad *)out; - if (WARN_ON_ONCE(in_mad_size != sizeof(*in_mad) || - *out_mad_size != sizeof(*out_mad))) - return IB_MAD_RESULT_FAILURE; - switch (in_mad->mad_hdr.mgmt_class) { case IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE: case IB_MGMT_CLASS_SUBN_LID_ROUTED: |