aboutsummaryrefslogtreecommitdiffstats
path: root/net/lapb/lapb_in.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2013-08-22 11:19:07 -0400
committerMark Brown <broonie@linaro.org>2013-08-22 14:07:51 -0400
commit7bc003100b61cdfe0515fe907010fe822353d924 (patch)
tree9728df84bb395e8b7c14b5ba31c62e0cc8fb727d /net/lapb/lapb_in.c
parentc2b6a3a82d630574cc1ad859722d507a1fde889a (diff)
spi: bcm2835: Add spi_master_get() call to prevent use after free
The call to spi_unregister_master results in device memory being freed, it must no longer be accessed afterwards. Thus call spi_master_get() to get an extra reference to the device and call spi_master_put() only after the last access to device data. Note, current code has an extra spi_master_put() call in bcm2835_spi_remove(). Thus this patch just adds an spi_master_get() to balance the reference count. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'net/lapb/lapb_in.c')
0 files changed, 0 insertions, 0 deletions