linux/drivers/base/regmap
Quentin Casasnovas 197b3975f4 regmap: fix kernel hang on regmap_bulk_write with zero val_count.
Fixes commit 2f06fa04cf which was an
incorrect backported version of commit
d6b41cb060 upstream.

If val_count is zero we return -EINVAL with map->lock_arg locked, which
will deadlock the kernel next time we try to acquire this lock.

This was introduced by f5942dd ("regmap: fix possible ZERO_SIZE_PTR pointer
dereferencing error.") which improperly back-ported d6b41cb0.

This issue was found during review of Ubuntu Trusty 3.13.0-40.68 kernel to
prepare Ksplice rebootless updates.

Fixes: f5942dd ("regmap: fix possible ZERO_SIZE_PTR pointer dereferencing error.")
Signed-off-by: Quentin Casasnovas <quentin.casasnovas@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-21 09:23:06 -08:00
..
internal.h Merge remote-tracking branch 'regmap/topic/field' into regmap-next 2013-10-28 13:01:33 -07:00
Kconfig regmap: add SPMI support 2013-10-28 12:51:43 -07:00
Makefile regmap: add SPMI support 2013-10-28 12:51:43 -07:00
regcache-flat.c regmap: flat: Add flat cache type 2013-01-02 10:58:53 +00:00
regcache-lzo.c regmap: cache: Pass the map rather than the word size when updating values 2013-03-04 10:30:27 +08:00
regcache-rbtree.c regmap: Updates for v3.12 2013-09-03 10:07:40 -07:00
regcache.c regmap: Don't attempt block writes when syncing cache on single_rw devices 2014-10-05 14:52:17 -07:00
regmap-debugfs.c regmap: debugfs: fix possbile NULL pointer dereference 2014-10-30 09:38:20 -07:00
regmap-i2c.c i2c: Split I2C_M_NOSTART support out of I2C_FUNC_PROTOCOL_MANGLING 2012-05-30 10:55:34 +02:00
regmap-irq.c regmap: irq: Allow using zero value for ack_base 2013-12-16 20:50:13 +00:00
regmap-mmio.c regmap: use IS_ERR() to check clk_get() results 2013-11-26 13:16:31 +00:00
regmap-spi.c regmap: spi: Handle async writes of only one buffer 2013-10-14 22:09:26 +01:00
regmap-spmi.c regmap: add SPMI support 2013-10-28 12:51:43 -07:00
regmap.c regmap: fix kernel hang on regmap_bulk_write with zero val_count. 2014-11-21 09:23:06 -08:00