crypto/scheduler: fix uninitialized capabilities
authorPablo de Lara <pablo.de.lara.guarch@intel.com>
Wed, 19 Apr 2017 15:02:15 +0000 (16:02 +0100)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Thu, 20 Apr 2017 09:32:45 +0000 (11:32 +0200)
commitc570f262e8ce3cf0c186b435a9dfa80ce7536802
tree1e5cb92275fc1bc6463404a747798d970fd375f7
parent21d0b0433c955c7e4c54c55ffb81119f1f7c3689
crypto/scheduler: fix uninitialized capabilities

Capability information is updated as slaves are attached,
but if this information is requested via rte_cryptodev_info_get()
when no slaves have been attached, the structure would not be
initialized, leading to a potential segmentation fault.

Therefore, the structure should be initialized with no
capabilities at device creation.

Fixes: 31439ee72b2c ("crypto/scheduler: add API implementations")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
drivers/crypto/scheduler/scheduler_pmd.c