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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: Markus Elfring [mailto:Markus.Elfring@xxxxxx]
> Sent: Tuesday, December 26, 2023 6:12 PM
> To: kernel test robot <lkp@xxxxxxxxx>; virtualization@xxxxxxxxxxxxxxx;
> linux-crypto@xxxxxxxxxxxxxxx; kernel-janitors@xxxxxxxxxxxxxxx; David S. Miller
> <davem@xxxxxxxxxxxxx>; Gonglei (Arei) <arei.gonglei@xxxxxxxxxx>; Herbert
> Xu <herbert@xxxxxxxxxxxxxxxxxxx>; Jason Wang <jasowang@xxxxxxxxxx>;
> Michael S. Tsirkin <mst@xxxxxxxxxx>; Xuan Zhuo
> <xuanzhuo@xxxxxxxxxxxxxxxxx>
> Cc: llvm@xxxxxxxxxxxxxxx; oe-kbuild-all@xxxxxxxxxxxxxxx; netdev@xxxxxxxxxxxxxxx;
> LKML <linux-kernel@xxxxxxxxxxxxxxx>; cocci@xxxxxxxx
> Subject: [PATCH v2] crypto: virtio - Less function calls in
> __virtio_crypto_akcipher_do_req() after error detection
> 
> From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
> 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 <elfring@xxxxxxxxxxxxxxxxxxxxx>
> ---
> 
> 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@xxxxxxxxxx>


Regards,
-Gonglei




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux