]> git.ipfire.org Git - people/arne_f/kernel.git/commit
mmc: core: check for zero length ioctl data
authorJohan Rudholm <johan.rudholm@stericsson.com>
Wed, 23 Nov 2011 08:05:58 +0000 (09:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Mar 2012 00:33:42 +0000 (16:33 -0800)
commite9513216eb2c0276e227fbb9a6f754e16c9c7510
tree7acfe96bab9a05d7f017f0f19dd7f9407083a8f2
parente8b827b4f14a1a25b909236a08a5fe63b92a658f
mmc: core: check for zero length ioctl data

commit 4d6144de8ba263eb3691a737c547e5b2fdc45287 upstream.

If the read or write buffer size associated with the command sent
through the mmc_blk_ioctl is zero, do not prepare data buffer.

This enables a ioctl(2) call to for instance send a MMC_SWITCH to set
a byte in the ext_csd.

Signed-off-by: Johan Rudholm <johan.rudholm@stericsson.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mmc/card/block.c