]> 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)
commitc080efb8a8af8829583bfe5913ff57571280d593
tree016cbeb1b578c662b41573af8ba96a469331a088
parentd30aa686d42e104ee989a1eb2fcb09cecb5f6881
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: 92461c5a9ae9 ("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