cryptodev: fix asserting single queue
authorHalil Pasic <pasic@linux.vnet.ibm.com>
Wed, 22 Mar 2017 12:36:55 +0000 (13:36 +0100)
committerGonglei <arei.gonglei@huawei.com>
Thu, 23 Mar 2017 09:22:01 +0000 (17:22 +0800)
We already check for queues == 1 in cryptodev_builtin_init and when that
is not true raise an error. But before that error is reported the
assertion in cryptodev_builtin_cleanup kicks in (because object is being
finalized and freed).

Let's remove assert(queues == 1) form cryptodev_builtin_cleanup as it
does only harm and no good.

Reported-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Signed-off-by: Halil Pasic <pasic@linux.vnet.ibm.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
backends/cryptodev-builtin.c

index b24a299d9ea4d9087726dac2dd5941f4d4cc6887..657c0ba2f3e6a45a68036e2aafa114325554ab9c 100644 (file)
@@ -361,8 +361,6 @@ static void cryptodev_builtin_cleanup(
         }
     }
 
-    assert(queues == 1);
-
     for (i = 0; i < queues; i++) {
         cc = backend->conf.peers.ccs[i];
         if (cc) {