Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6

Pull crypto fixes from Herbert Xu:

- fix regression in af_alg that affects iwd

- restore polling delay in qat

- fix double free in ingenic on error path

- fix potential build failure in sa2ul due to missing Kconfig dependency

* 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
crypto: af_alg - Work around empty control messages without MSG_MORE
crypto: sa2ul - add Kconfig selects to fix build error
crypto: ingenic - Drop kfree for memory allocated with devm_kzalloc
crypto: qat - add delay before polling mailbox

+19 -13
+10 -3
crypto/af_alg.c
··· 16 16 #include <linux/module.h> 17 17 #include <linux/net.h> 18 18 #include <linux/rwsem.h> 19 + #include <linux/sched.h> 19 20 #include <linux/sched/signal.h> 20 21 #include <linux/security.h> 21 22 ··· 846 845 } 847 846 848 847 lock_sock(sk); 849 - if (ctx->init && (init || !ctx->more)) { 850 - err = -EINVAL; 851 - goto unlock; 848 + if (ctx->init && !ctx->more) { 849 + if (ctx->used) { 850 + err = -EINVAL; 851 + goto unlock; 852 + } 853 + 854 + pr_info_once( 855 + "%s sent an empty control message without MSG_MORE.\n", 856 + current->comm); 852 857 } 853 858 ctx->init = true; 854 859
+2 -7
drivers/char/hw_random/ingenic-rng.c
··· 92 92 priv->base = devm_platform_ioremap_resource(pdev, 0); 93 93 if (IS_ERR(priv->base)) { 94 94 pr_err("%s: Failed to map RNG registers\n", __func__); 95 - ret = PTR_ERR(priv->base); 96 - goto err_free_rng; 95 + return PTR_ERR(priv->base); 97 96 } 98 97 99 98 priv->version = (enum ingenic_rng_version)of_device_get_match_data(&pdev->dev); ··· 105 106 ret = hwrng_register(&priv->rng); 106 107 if (ret) { 107 108 dev_err(&pdev->dev, "Failed to register hwrng\n"); 108 - goto err_free_rng; 109 + return ret; 109 110 } 110 111 111 112 platform_set_drvdata(pdev, priv); 112 113 113 114 dev_info(&pdev->dev, "Ingenic RNG driver registered\n"); 114 115 return 0; 115 - 116 - err_free_rng: 117 - kfree(priv); 118 - return ret; 119 116 } 120 117 121 118 static int ingenic_rng_remove(struct platform_device *pdev)
+3
drivers/crypto/Kconfig
··· 873 873 select CRYPTO_AES 874 874 select CRYPTO_AES_ARM64 875 875 select CRYPTO_ALGAPI 876 + select CRYPTO_SHA1 877 + select CRYPTO_SHA256 878 + select CRYPTO_SHA512 876 879 select HW_RANDOM 877 880 select SG_SPLIT 878 881 help
+4 -3
drivers/crypto/qat/qat_common/adf_admin.c
··· 131 131 memcpy(admin->virt_addr + offset, in, ADF_ADMINMSG_LEN); 132 132 ADF_CSR_WR(mailbox, mb_offset, 1); 133 133 134 - ret = readl_poll_timeout(mailbox + mb_offset, status, 135 - status == 0, ADF_ADMIN_POLL_DELAY_US, 136 - ADF_ADMIN_POLL_TIMEOUT_US); 134 + ret = read_poll_timeout(ADF_CSR_RD, status, status == 0, 135 + ADF_ADMIN_POLL_DELAY_US, 136 + ADF_ADMIN_POLL_TIMEOUT_US, true, 137 + mailbox, mb_offset); 137 138 if (ret < 0) { 138 139 /* Response timeout */ 139 140 dev_err(&GET_DEV(accel_dev),