linux/drivers/crypto
Thomas Gleixner 73810a0691 crypto: N2 - Replace racy task affinity logic
spu_queue_register() needs to invoke setup functions on a particular
CPU. This is achieved by temporarily setting the affinity of the
calling user space thread to the requested CPU and reset it to the original
affinity afterwards.

That's racy vs. CPU hotplug and concurrent affinity settings for that
thread resulting in code executing on the wrong CPU and overwriting the
new affinity setting.

Replace it by using work_on_cpu_safe() which guarantees to run the code on
the requested CPU or to fail in case the CPU is offline.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: "David S. Miller" <davem@davemloft.net>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Sebastian Siewior <bigeasy@linutronix.de>
Cc: Lai Jiangshan <jiangshanlai@gmail.com>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: linux-crypto@vger.kernel.org
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Tejun Heo <tj@kernel.org>
Cc: Len Brown <lenb@kernel.org>
Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1704131019420.2408@nanos
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2017-04-15 12:20:56 +02:00
..
amcc crypto: crypto4xx - Fix size used in dma_free_coherent() 2016-10-21 11:03:41 +08:00
bcm crypto: brcm - Avoid double free in ahash_finup() 2017-02-15 13:23:51 +08:00
caam scripts/spelling.txt: add "deintialize(d)" pattern and fix typo instances 2017-02-27 18:43:47 -08:00
cavium/cpt crypto: cavium - fix leak on curr if curr->head fails to be allocated 2017-02-27 18:09:38 +08:00
ccp crypto: ccp - Make some CCP DMA channels private 2017-03-24 21:51:34 +08:00
chelsio treewide: Remove remaining executable attributes from source files 2017-02-25 12:12:50 -08:00
marvell Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2016-12-27 17:51:36 -08:00
mediatek crypto: mediatek - add support to GCM mode 2017-01-23 22:50:33 +08:00
nx crypto: nx - drop duplicate header types.h 2016-11-17 23:34:55 +08:00
qat crypto: qat - zero esram only for DH85x devices 2017-02-02 21:54:53 +08:00
qce crypto: qce - Use skcipher for fallback 2016-07-01 23:45:09 +08:00
rockchip crypto: rockchip - use devm_add_action_or_reset() 2016-08-24 21:07:11 +08:00
sunxi-ss crypto: sun4i-ss - mark sun4i_hash() static 2016-09-22 18:32:48 +08:00
ux500 scripts/spelling.txt: add "disble(d)" pattern and fix typo instances 2017-03-09 17:01:09 -08:00
virtio virtio, vhost: optimizations, fixes 2017-03-02 13:53:13 -08:00
vmx crypto: vmx - Use skcipher for xts fallback 2017-03-02 18:57:31 +08:00
atmel-aes-regs.h crypto: atmel-authenc - add support to authenc(hmac(shaX), Y(aes)) modes 2017-02-03 18:16:14 +08:00
atmel-aes.c crypto: atmel-authenc - add support to authenc(hmac(shaX), Y(aes)) modes 2017-02-03 18:16:14 +08:00
atmel-authenc.h crypto: atmel-authenc - add support to authenc(hmac(shaX), Y(aes)) modes 2017-02-03 18:16:14 +08:00
atmel-sha-regs.h crypto: atmel-authenc - add support to authenc(hmac(shaX), Y(aes)) modes 2017-02-03 18:16:14 +08:00
atmel-sha.c crypto: atmel-sha - fix error management in atmel_sha_start() 2017-02-15 13:23:33 +08:00
atmel-tdes-regs.h crypto: atmel-tdes - add support for latest release of the IP (0x700) 2013-03-10 16:46:42 +08:00
atmel-tdes.c crypto: atmel - fix 64-bit build warnings 2017-02-11 17:52:29 +08:00
bfin_crc.c crypto: bfin_crc - Fix format printing warning 2016-12-27 17:50:51 +08:00
bfin_crc.h crypto: bfin_crc - Remove unneeded linux/miscdevice.h include 2016-12-27 17:50:51 +08:00
geode-aes.c crypto: geode - Don't use tfm->__crt_alg->cra_name directly 2014-05-22 21:03:13 +08:00
geode-aes.h crypto: geode - Consistently use AES_KEYSIZE_128 2014-05-22 21:03:12 +08:00
hifn_795x.c crypto: squash lines for simple wrapper functions 2016-09-13 20:27:26 +08:00
img-hash.c crypto: img-hash - use dma_data_direction when calling dma_map_sg 2017-01-23 22:50:23 +08:00
ixp4xx_crypto.c crypto: ixp4xx - Add missing npe_c release in error branches 2016-08-09 18:47:03 +08:00
Kconfig Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2017-03-04 10:42:53 -08:00
Makefile crypto: brcm - Add Broadcom SPU driver 2017-02-11 17:55:20 +08:00
mv_cesa.c Crypto: mv_cesa - Switch to using managed resources 2016-11-13 17:45:01 +08:00
mv_cesa.h crypto: mv_cesa - Add missing #define 2014-08-29 21:46:36 +08:00
mxc-scc.c crypto: mxc-scc - check clk_prepare_enable() error 2016-08-24 21:04:50 +08:00
mxs-dcp.c crypto: mxs-dcp - Use skcipher for fallback 2016-07-01 23:45:08 +08:00
n2_asm.S crypto: n2 - Add Niagara2 crypto driver 2010-05-19 14:14:04 +10:00
n2_core.c crypto: N2 - Replace racy task affinity logic 2017-04-15 12:20:56 +02:00
n2_core.h crypto: n2 - Add Niagara2 crypto driver 2010-05-19 14:14:04 +10:00
omap-aes.c crypto: omap-aes - fix error return code in omap_aes_probe() 2016-09-22 18:27:35 +08:00
omap-des.c crypto: omap-des - fix error return code in omap_des_probe() 2016-09-22 18:27:34 +08:00
omap-sham.c crypto: omap-sham - shrink the internal buffer size 2016-09-22 18:32:53 +08:00
padlock-aes.c x86/fpu: Remove irq_ts_save() and irq_ts_restore() 2016-11-01 07:47:54 +01:00
padlock-sha.c x86/fpu: Remove irq_ts_save() and irq_ts_restore() 2016-11-01 07:47:54 +01:00
picoxcell_crypto_regs.h crypto: picoxcell - add support for the picoxcell crypto engines 2011-02-21 22:42:40 +11:00
picoxcell_crypto.c crypto: picoxcell - Remove spacc_is_compatible() wrapper function 2017-01-13 00:24:41 +08:00
s5p-sss.c crypto: s5p-sss - Fix spinlock recursion on LRW(AES) 2017-03-09 18:14:31 +08:00
sahara.c crypto: sahara - fix typo "Decidated" -> "Dedicated" 2016-11-01 08:37:12 +08:00
talitos.c crypto: talitos - fix spelling mistake 2016-11-13 17:44:59 +08:00
talitos.h crypto: talitos - add new crypto modes 2015-12-04 22:29:56 +08:00