Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1268795
| From | Luis Henriques <luis.henriques@canonical.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3.16.y-ckt 67/94] crypto: api - Only abort operations on fatal signal |
| Date | 2015-11-13 11:30 +0100 |
| Message-ID | <qujMe-5a8-21@gated-at.bofh.it> (permalink) |
| References | <qujCx-56Q-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
3.16.7-ckt20 -stable review patch. If anyone has any objections, please let me know.
------------------
From: Herbert Xu <herbert@gondor.apana.org.au>
commit 3fc89adb9fa4beff31374a4bf50b3d099d88ae83 upstream.
Currently a number of Crypto API operations may fail when a signal
occurs. This causes nasty problems as the caller of those operations
are often not in a good position to restart the operation.
In fact there is currently no need for those operations to be
interrupted by user signals at all. All we need is for them to
be killable.
This patch replaces the relevant calls of signal_pending with
fatal_signal_pending, and wait_for_completion_interruptible with
wait_for_completion_killable, respectively.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
crypto/ablkcipher.c | 2 +-
crypto/algapi.c | 2 +-
crypto/api.c | 6 +++---
crypto/crypto_user.c | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/crypto/ablkcipher.c b/crypto/ablkcipher.c
index 40886c489903..520729d898fe 100644
--- a/crypto/ablkcipher.c
+++ b/crypto/ablkcipher.c
@@ -695,7 +695,7 @@ struct crypto_ablkcipher *crypto_alloc_ablkcipher(const char *alg_name,
err:
if (err != -EAGAIN)
break;
- if (signal_pending(current)) {
+ if (fatal_signal_pending(current)) {
err = -EINTR;
break;
}
diff --git a/crypto/algapi.c b/crypto/algapi.c
index 00d8d939733b..daf2f653b131 100644
--- a/crypto/algapi.c
+++ b/crypto/algapi.c
@@ -325,7 +325,7 @@ static void crypto_wait_for_test(struct crypto_larval *larval)
crypto_alg_tested(larval->alg.cra_driver_name, 0);
}
- err = wait_for_completion_interruptible(&larval->completion);
+ err = wait_for_completion_killable(&larval->completion);
WARN_ON(err);
out:
diff --git a/crypto/api.c b/crypto/api.c
index 2a81e98a0021..7db2e89a3114 100644
--- a/crypto/api.c
+++ b/crypto/api.c
@@ -172,7 +172,7 @@ static struct crypto_alg *crypto_larval_wait(struct crypto_alg *alg)
struct crypto_larval *larval = (void *)alg;
long timeout;
- timeout = wait_for_completion_interruptible_timeout(
+ timeout = wait_for_completion_killable_timeout(
&larval->completion, 60 * HZ);
alg = larval->adult;
@@ -435,7 +435,7 @@ struct crypto_tfm *crypto_alloc_base(const char *alg_name, u32 type, u32 mask)
err:
if (err != -EAGAIN)
break;
- if (signal_pending(current)) {
+ if (fatal_signal_pending(current)) {
err = -EINTR;
break;
}
@@ -552,7 +552,7 @@ void *crypto_alloc_tfm(const char *alg_name,
err:
if (err != -EAGAIN)
break;
- if (signal_pending(current)) {
+ if (fatal_signal_pending(current)) {
err = -EINTR;
break;
}
diff --git a/crypto/crypto_user.c b/crypto/crypto_user.c
index e2a34feec7a4..c90af2537d24 100644
--- a/crypto/crypto_user.c
+++ b/crypto/crypto_user.c
@@ -367,7 +367,7 @@ static struct crypto_alg *crypto_user_aead_alg(const char *name, u32 type,
err = PTR_ERR(alg);
if (err != -EAGAIN)
break;
- if (signal_pending(current)) {
+ if (fatal_signal_pending(current)) {
err = -EINTR;
break;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[3.16.y-ckt stable] Linux 3.16.7-ckt20 stable review Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:20 +0100 [PATCH 3.16.y-ckt 05/94] svcrdma: handle rdma read with a non-zero initial page offset Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:20 +0100 [PATCH 3.16.y-ckt 92/94] sfc: Fix memcpy() with const destination compiler warning. Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:20 +0100 [PATCH 3.16.y-ckt 89/94] ppp, slip: Validate VJ compression slot parameters completely Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:20 +0100 [PATCH 3.16.y-ckt 88/94] isdn_ppp: Add checks for allocation failure in isdn_ppp_open() Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:20 +0100 [PATCH 3.16.y-ckt 52/94] ASoC: Add info callback for SX_TLV controls Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:20 +0100 [PATCH 3.16.y-ckt 46/94] ARM: orion: Fix DSA platform device after mvmdio conversion Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:20 +0100 [PATCH 3.16.y-ckt 43/94] iwlwifi: mvm: fix D3 firmware PN programming Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:20 +0100 [PATCH 3.16.y-ckt 35/94] i2c: designware: Do not use parameters from ACPI on Dell Inspiron 7348 Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:20 +0100 [PATCH 3.16.y-ckt 14/94] usb: Add device quirk for Logitech PTZ cameras Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:20 +0100 [PATCH 3.16.y-ckt 22/94] drm/radeon: add pm sysfs files late Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:20 +0100 [PATCH 3.16.y-ckt 39/94] rbd: fix double free on rbd_dev->header_name Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:20 +0100 [PATCH 3.16.y-ckt 71/94] i2c: mv64xxx: really allow I2C offloading Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:20 +0100 [PATCH 3.16.y-ckt 91/94] power: bq24190_charger: suppress build warning Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:20 +0100 [PATCH 3.16.y-ckt 90/94] staging/dgnc: fix info leak in ioctl Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:20 +0100 [PATCH 3.16.y-ckt 33/94] i2c: s3c2410: enable RuntimePM before registering to the core Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:20 +0100 [PATCH 3.16.y-ckt 86/94] serial: 8250_pci: Add support for 12 port Exar boards Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:20 +0100 [PATCH 3.16.y-ckt 94/94] sched/preempt: Fix cond_resched_lock() and cond_resched_softirq() Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:20 +0100 [PATCH 3.16.y-ckt 93/94] sched/preempt: Rename PREEMPT_CHECK_OFFSET to PREEMPT_DISABLE_OFFSET Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:20 +0100 [PATCH 3.16.y-ckt 65/94] iwlwifi: mvm: init card correctly on ctkill exit check Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:30 +0100 [PATCH 3.16.y-ckt 70/94] iommu/amd: Don't clear DTE flags when modifying it Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:30 +0100 [PATCH 3.16.y-ckt 77/94] drm/radeon: fix dpms when driver backlight control is disabled Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:30 +0100 [PATCH 3.16.y-ckt 69/94] md/raid10: submit_bio_wait() returns 0 on success Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:30 +0100 [PATCH 3.16.y-ckt 67/94] crypto: api - Only abort operations on fatal signal Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:30 +0100 [PATCH 3.16.y-ckt 66/94] module: Fix locking in symbol_put_addr() Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:30 +0100 [PATCH 3.16.y-ckt 74/94] Revert "ARM64: unwind: Fix PC calculation" Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:30 +0100 [PATCH 3.16.y-ckt 82/94] ppp: fix pppoe_dev deletion condition in pppoe_release() Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:30 +0100 [PATCH 3.16.y-ckt 72/94] drm/radeon: don't try to recreate sysfs entries on resume Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:30 +0100 [PATCH 3.16.y-ckt 63/94] dm btree: fix leak of bufio-backed block in btree_split_beneath error path Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:30 +0100 [PATCH 3.16.y-ckt 55/94] xhci: Add spurious wakeup quirk for LynxPoint-LP controllers Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:30 +0100 [PATCH 3.16.y-ckt 80/94] Revert "md: allow a partially recovered device to be hot-added to an array." Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:30 +0100 [PATCH 3.16.y-ckt 76/94] drm/radeon: move bl encoder assignment into bl init Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:30 +0100 [PATCH 3.16.y-ckt 83/94] ipv6: gre: support SIT encapsulation Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:30 +0100 [PATCH 3.16.y-ckt 50/94] drm/i915: Deny wrapping an userptr into a framebuffer Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:40 +0100 [PATCH 3.16.y-ckt 58/94] powerpc/rtas: Validate rtas.entry before calling enter_rtas() Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:40 +0100 [PATCH 3.16.y-ckt 53/94] xhci: don't finish a TD if we get a short transfer event mid TD Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:40 +0100 [PATCH 3.16.y-ckt 48/94] iio: mxs-lradc: Fix temperature offset Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:40 +0100 [PATCH 3.16.y-ckt 62/94] dm btree remove: fix a bug when rebalancing nodes after removal Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:40 +0100 [PATCH 3.16.y-ckt 57/94] drm/nouveau/gem: return only valid domain when there's only one Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:40 +0100 [PATCH 3.16.y-ckt 59/94] mm: make sendfile(2) killable Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:40 +0100 [PATCH 3.16.y-ckt 56/94] ASoC: wm8904: Correct number of EQ registers Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:40 +0100 [PATCH 3.16.y-ckt 44/94] iwlwifi: fix firmware filename for 3160 Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:40 +0100 [PATCH 3.16.y-ckt 45/94] iwlwifi: pci: add a few more PCI subvendor IDs for the 7265 series Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:40 +0100 [PATCH 3.16.y-ckt 54/94] xhci: handle no ping response error properly Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:40 +0100 [PATCH 3.16.y-ckt 47/94] xen-blkfront: check for null drvdata in blkback_changed (XenbusStateClosing) Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:40 +0100 [PATCH 3.16.y-ckt 51/94] x86/efi: Fix multiple GOP device support Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:40 +0100 [PATCH 3.16.y-ckt 49/94] ALSA: hda - Fix inverted internal mic on Lenovo G50-80 Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:40 +0100 [PATCH 3.16.y-ckt 61/94] rbd: prevent kernel stack blow up on rbd map Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:40 +0100 [PATCH 3.16.y-ckt 23/94] drm/radeon: add quirk for MSI R7 370 Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:50 +0100 [PATCH 3.16.y-ckt 34/94] i2c: designware-platdrv: enable RuntimePM before registering to the core Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:50 +0100 [PATCH 3.16.y-ckt 36/94] btrfs: fix possible leak in btrfs_ioctl_balance() Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:50 +0100 [PATCH 3.16.y-ckt 27/94] arm64: errata: use KBUILD_CFLAGS_MODULE for erratum #843419 Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:50 +0100 [PATCH 3.16.y-ckt 41/94] iio: accel: sca3000: memory corruption in sca3000_read_first_n_hw_rb() Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:50 +0100 [PATCH 3.16.y-ckt 31/94] btrfs: fix use after free iterating extrefs Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:50 +0100 [PATCH 3.16.y-ckt 29/94] dm thin: fix missing pool reference count decrement in pool_ctr error path Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:50 +0100 [PATCH 3.16.y-ckt 38/94] usb: xhci: Add support for URB_ZERO_PACKET to bulk/sg transfers Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:50 +0100 [PATCH 3.16.y-ckt 30/94] btrfs: check unsupported filters in balance arguments Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:50 +0100 [PATCH 3.16.y-ckt 42/94] iwlwifi: dvm: fix D3 firmware PN programming Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:50 +0100 [PATCH 3.16.y-ckt 28/94] crypto: ahash - ensure statesize is non-zero Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:50 +0100 [PATCH 3.16.y-ckt 40/94] ath9k: declare required extra tx headroom Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 11:50 +0100 [PATCH 3.16.y-ckt 25/94] crypto: sparc - initialize blkcipher.ivsize Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 12:00 +0100 [PATCH 3.16.y-ckt 21/94] workqueue: make sure delayed work run in local cpu Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 12:00 +0100 [PATCH 3.16.y-ckt 04/94] s390/boot/decompression: disable floating point in decompressor Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 12:00 +0100 [PATCH 3.16.y-ckt 10/94] dm raid: fix round up of default region size Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 12:00 +0100 [PATCH 3.16.y-ckt 11/94] ALSA: hda: Add dock support for ThinkPad T550 Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 12:00 +0100 [PATCH 3.16.y-ckt 16/94] ALSA: synth: Fix conflicting OSS device registration on AWE32 Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 12:00 +0100 [PATCH 3.16.y-ckt 13/94] USB: Add reset-resume quirk for two Plantronics usb headphones. Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 12:00 +0100 [PATCH 3.16.y-ckt 03/94] x86/xen: Support kexec/kdump in HVM guests by doing a soft reset Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 12:00 +0100 [PATCH 3.16.y-ckt 02/94] regmap: debugfs: Don't bother actually printing when calculating max length Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 12:00 +0100 [PATCH 3.16.y-ckt 09/94] ASoC: dwc: correct irq clear method Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 12:00 +0100 [PATCH 3.16.y-ckt 12/94] ALSA: hda - Apply SPDIF pin ctl to MacBookPro 12,1 Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 12:00 +0100 [PATCH 3.16.y-ckt 06/94] dm: fix AB-BA deadlock in __dm_destroy() Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 12:00 +0100 [PATCH 3.16.y-ckt 26/94] drm/nouveau/fbcon: take runpm reference when userspace has an open fd Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 12:00 +0100 [PATCH 3.16.y-ckt 15/94] staging: speakup: fix speakup-r regression Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 12:00 +0100 [PATCH 3.16.y-ckt 20/94] 3w-9xxx: don't unmap bounce buffered commands Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 12:00 +0100 [PATCH 3.16.y-ckt 17/94] arm64: readahead: fault retry breaks mmap file read random detection Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 12:00 +0100 [PATCH 3.16.y-ckt 01/94] regmap: debugfs: Ensure we don't underflow when printing access masks Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 12:00 +0100 [PATCH 3.16.y-ckt 24/94] drm/radeon: add quirk for ASUS R7 370 Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 12:00 +0100 [PATCH 3.16.y-ckt 07/94] [SMB3] Do not fall back to SMBWriteX in set_file_size error cases Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 12:00 +0100 [PATCH 3.16.y-ckt 18/94] sched/core: Fix TASK_DEAD race in finish_task_switch() Luis Henriques <luis.henriques@canonical.com> - 2015-11-13 12:00 +0100
csiph-web