Thread (6 messages) flat view 6 messages, 5 authors, 2024-01-26

RE: [PATCH v2] crypto: virtio - Less function calls in __virtio_crypto_akcipher_do_req() after error detection

From: "Gonglei (Arei)" <arei.gonglei@huawei.com>
Date: 2023-12-26 12:22:19
Also in: kernel-janitors, linux-crypto, lkml, llvm, oe-kbuild-all, virtualization

-----Original Message-----
From: Markus Elfring [mailto:Markus.Elfring@web.de]
Sent: Tuesday, December 26, 2023 6:12 PM
To: kernel test robot <redacted>; virtualization@lists.linux.dev;
linux-crypto@vger.kernel.org; kernel-janitors@vger.kernel.org; David S. Miller
[off-list ref]; Gonglei (Arei) [off-list ref]; Herbert
Xu [off-list ref]; Jason Wang [off-list ref];
Michael S. Tsirkin [off-list ref]; Xuan Zhuo
[off-list ref]
Cc: llvm@lists.linux.dev; oe-kbuild-all@lists.linux.dev; netdev@vger.kernel.org;
LKML [off-list ref]; cocci@inria.fr
Subject: [PATCH v2] crypto: virtio - Less function calls in
__virtio_crypto_akcipher_do_req() after error detection

From: Markus Elfring <redacted>
Date: Tue, 26 Dec 2023 11:00:20 +0100

The kfree() function was called in up to two cases by the
__virtio_crypto_akcipher_do_req() function during error handling even if the
passed variable contained a null pointer.
This issue was detected by using the Coccinelle software.

* Adjust jump targets.

* Delete two initialisations which became unnecessary
  with this refactoring.

Signed-off-by: Markus Elfring <redacted>
---

v2:
A typo was fixed for the delimiter of a label.

 drivers/crypto/virtio/virtio_crypto_akcipher_algs.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
Reviewed-by: Gonglei <arei.gonglei@huawei.com>


Regards,
-Gonglei
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help