cryptodev: fix asserting single queue
PATCH 1/1 cryptodev: fix asserting single queue
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.
--- backends/cryptodev-builtin.c | 2 -- 1 file changed, 2 deletions(-)
backends/cryptodev-builtin.c +0 -2
@@ -359,8 +359,6 @@ static void cryptodev_builtin_cleanup( } } -assert (queues ==1 ); -for (i =0 ; i < queues; i++) { cc = backend->conf.peers.ccs[i];if (cc) {
Signature · 1 line
2.8.4
Quoted 9 lines · Halil Pasic
We already check for queues == 1 in
cryptodev_builtin_initand when that is not true raise an error. But before that error is reported the assertion incryptodev_builtin_cleanupkicks in (because object is being finalized and freed).Let's remove assert(queues == 1) form
cryptodev_builtin_cleanupas it does only harm and no good.Signed-off-by Halil Pasic <[email protected]>
Sorry guys, I forgot to give credit to the reporter.
Quoted 18 lines
--- backends/cryptodev-builtin.c | 2 -- 1 file changed, 2 deletions(-)backends/cryptodev-builtin.c +0
-2@@ -359,8 +359,6 @@ static void cryptodev_builtin_cleanup( } } -assert (queues ==1 ); -for (i =0 ; i < queues; i++) { cc = backend->conf.peers.ccs[i];if (cc) {
Eric Blake
Reviewed-byQuoted 8 lines · Halil Pasic
Quoted 5 lines · Halil Pasic
We already check for queues == 1 in
cryptodev_builtin_initand when that is not true raise an error. But before that error is reported the assertion incryptodev_builtin_cleanupkicks in (because object is being finalized and freed).
Quoted 8 lines
Quoted 4 lines
Let's remove assert(queues == 1) form
cryptodev_builtin_cleanupas it does only harm and no good.Signed-off-by Halil Pasic <[email protected]>Sorry guys, I forgot to give credit to the reporter.
Reported-by Boris Fiuczynski <[email protected]>
Quoted 21 lines
Quoted 18 lines
--- backends/cryptodev-builtin.c | 2 -- 1 file changed, 2 deletions(-)backends/cryptodev-builtin.c +0
-2@@ -359,8 +359,6 @@ static void cryptodev_builtin_cleanup( } } -assert (queues ==1 ); -for (i =0 ; i < queues; i++) { cc = backend->conf.peers.ccs[i];if (cc) {
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Gonglei (Arei)
AppliedQuoted 8 lines · Halil Pasic
Quoted 5 lines
We already check for queues == 1 in
cryptodev_builtin_initand when that is not true raise an error. But before that error is reported the assertion incryptodev_builtin_cleanupkicks in (because object is being finalized and freed).
Quoted 8 lines
Quoted 4 lines
Let's remove assert(queues == 1) form
cryptodev_builtin_cleanupas it does only harm and no good.Signed-off-by Halil Pasic <[email protected]>Sorry guys, I forgot to give credit to the reporter.
Reported-by Boris Fiuczynski <[email protected]>
Applied, thanks!
Quoted 18 lines
Quoted 18 lines
--- backends/cryptodev-builtin.c | 2 -- 1 file changed, 2 deletions(-)backends/cryptodev-builtin.c +0
-2@@ -359,8 +359,6 @@ static void cryptodev_builtin_cleanup( } } -assert (queues ==1 ); -for (i =0 ; i < queues; i++) { cc = backend->conf.peers.ccs[i];if (cc) {