summaryrefslogtreecommitdiffstats
path: root/fs/partitions/check.c
diff options
context:
space:
mode:
authorAnton Vorontsov <cbouatmailru@gmail.com>2010-09-07 17:31:49 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-22 10:16:43 -0700
commit5cfc64ceb6222aabec640ba76e89529a8fc2c1f0 (patch)
treecb49e651fbb5ec4192ef650fd5b63c1dba0040f1 /fs/partitions/check.c
parent87544653abe4a03324bc85dae32d5bdaabcfccef (diff)
downloadop-kernel-dev-5cfc64ceb6222aabec640ba76e89529a8fc2c1f0.zip
op-kernel-dev-5cfc64ceb6222aabec640ba76e89529a8fc2c1f0.tar.gz
base/platform: Safe handling for NULL platform data and resources
Some users of platform_device_add_{data,resources}() assume that NULL data and resources will be handled specially, i.e. just ignored. But the platform core ends up calling kmemdup(NULL, 0, ...), which returns a non-NULL result (i.e. ZERO_SIZE_PTR), which causes drivers to oops on a valid code, something like: if (platform_data) stuff = platform_data->stuff; This patch makes the platform core a bit more safe for such cases. Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/partitions/check.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud