mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
e881279363
Daniel Drake noticed a crash in the error path of mmc_attach_sdio(). This bug is discussed at http://dev.laptop.org/ticket/9707. BUG: unable to handle kernel paging request at 6b6b6c57 IP: [<b066d6e2>] sdio_remove_func+0x9/0x27 Call Trace: [<b066cfb4>] ? mmc_sdio_remove+0x34/0x65 [<b066d1fc>] ? mmc_attach_sdio+0x217/0x240 [<b066a22f>] ? mmc_rescan+0x1a2/0x20f [<b042e9a0>] ? worker_thread+0x156/0x1e We need to accurately track how many SDIO functions have been initialised (and keep card->sdio_funcs in sync) so that we don't try to remove more functions than we initialised if we hit the error path in mmc_attach_sdio(). Without this patch if we hit the error path in mmc_attach_sdio() we run the risk of deferencing invalid memory in sdio_remove_func(), leading to a crash. Signed-off-by: Matt Fleming <matt@console-pimps.org> Cc: Daniel Drake <dsd@laptop.org> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
||
---|---|---|
.. | ||
bus.c | ||
bus.h | ||
core.c | ||
core.h | ||
debugfs.c | ||
host.c | ||
host.h | ||
Kconfig | ||
Makefile | ||
mmc.c | ||
mmc_ops.c | ||
mmc_ops.h | ||
sd.c | ||
sd_ops.c | ||
sd_ops.h | ||
sdio.c | ||
sdio_bus.c | ||
sdio_bus.h | ||
sdio_cis.c | ||
sdio_cis.h | ||
sdio_io.c | ||
sdio_irq.c | ||
sdio_ops.c | ||
sdio_ops.h |