aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/xen-netback/interface.c
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2013-01-29 12:01:13 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-02-14 10:47:59 -0800
commit7e027c2b4a655e7864f3d8e99e7bff6c5c518c0a (patch)
tree2e92e0ae80e067ea891e19aa0c4636e430aad304 /drivers/net/xen-netback/interface.c
parent42e14e4033ccc1f2093c4cd2f85272923dbdb893 (diff)
regulator: clear state each invocation of of_regulator_match
commit a2f95c363701deba2205f81929b40222ea6f4f80 upstream. of_regulator_match() saves some dynamcially allocated state into the match table that's passed to it. By implementation and not contract, for each match table entry, if non-NULL state is already present, of_regulator_match() will not overwrite it. of_regulator_match() is typically called each time a regulator is probe()d. This means it is called with the same match table over and over again if a regulator triggers deferred probe. This results in stale, kfree()d data being left in the match table from probe to probe, which causes a variety of crashes or use of invalid data. Explicitly free all output state from of_regulator_match() before generating new results in order to avoid this. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/xen-netback/interface.c')
0 files changed, 0 insertions, 0 deletions