]> git.baikalelectronics.ru Git - kernel.git/commit
IB/uverbs: Allow an empty namespace in ioctl() framework
authorMatan Barak <matanb@mellanox.com>
Sun, 17 Jun 2018 09:59:54 +0000 (12:59 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 19 Jun 2018 16:53:02 +0000 (10:53 -0600)
commitd10d6ef6696eeae66502e2a226933fa1fce79d94
tree016cbeb1b578c662b41573af8ba96a469331a088
parenta1365569eb1ea450762d4a0c77bc4347376e5ce9
IB/uverbs: Allow an empty namespace in ioctl() framework

The ioctl parser framework wrongly assumed that each namespace is
populated. This could lead to NULL dereferences. Fix the parser to
always check that a given namespace indeed exists.

Fixes: e3f952a56c53 ("IB/core: Add new ioctl interface")
Signed-off-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/uverbs_ioctl.c