]> git.baikalelectronics.ru Git - kernel.git/commit
RDMA/uverbs: Initialize udata struct on destroy flows
authorGal Pressman <galpress@amazon.com>
Tue, 30 Apr 2019 08:46:39 +0000 (11:46 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 2 May 2019 20:07:02 +0000 (17:07 -0300)
commit65b53bb91c749a2ae7f61a46ac070baa03ebacbd
tree72ec3e104f5d6fc21eca9bff9771e00a1a8c1a7a
parentd993510531ea752a6436271c540553bda22926c3
RDMA/uverbs: Initialize udata struct on destroy flows

Cited commit introduced the udata parameter to different destroy flows
but the uapi method definition does not have udata (i.e has_udata flag
is not set). As a result, an uninitialized udata struct is being passed
down to the driver callbacks.

Fix that by clearing the driver udata even in cases where has_udata flag
is not set.

Fixes: e9b97bea11b8 ("IB: Pass uverbs_attr_bundle down ib_x destroy path")
Cc: Shamir Rabinovitch <shamir.rabinovitch@oracle.com>
Co-developed-by: Jason Gunthorpe <jgg@ziepe.ca>
Signed-off-by: Jason Gunthorpe <jgg@ziepe.ca>
Signed-off-by: Gal Pressman <galpress@amazon.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/uverbs_ioctl.c