[lkml]   [2017]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH V14 04/24] mmc: block: Ensure that debugfs files are removed
On Tue, Nov 21, 2017 at 2:42 PM, Adrian Hunter <> wrote:

> The card is not necessarily being removed, but the debugfs files must be
> removed when the driver is removed, otherwise they will continue to exist
> after unbinding the card from the driver. e.g.
> # echo "mmc1:0001" > /sys/bus/mmc/drivers/mmcblk/unbind
> # cat /sys/kernel/debug/mmc1/mmc1\:0001/ext_csd
> [ 173.634584] BUG: unable to handle kernel NULL pointer dereference at 0000000000000050
> [ 173.643356] IP: mmc_ext_csd_open+0x5e/0x170
> A complication is that the debugfs_root may have already been removed, so
> check for that too.
> Fixes: 627c3ccfb46a ("mmc: debugfs: Move block debugfs into block module")
> Signed-off-by: Adrian Hunter <>

Reviewed-by: Linus Walleij <>

I was assuming debugfs would always be removed from debugfs.c
using debugfs_remove_recursive(card->debugfs_root) but that
doesn't work for this case where we bin/unbind the block layer
interactively, sorry for missing it :(

Ulf: I think this can go in as an *early* fix as well, say after -rc1.

Linus Walleij

 \ /
  Last update: 2017-11-23 14:23    [W:0.164 / U:4.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site