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:30:54 +0000 (16:30 -0800)
commitf3d763847f78da07fb82f6d9e8242875cf6995d3
tree5e8ad1600e763b66dfdc1606844f40a86277ec54
parent2a8e5e8a2df18812c60720fa0534c29c9f1c17b6
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