lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 23 Nov 2017 14:22:34 +0100
From:   Linus Walleij <>
To:     Adrian Hunter <>
Cc:     Ulf Hansson <>,
        linux-mmc <>,
        linux-block <>,
        linux-kernel <>,
        Bough Chen <>,
        Alex Lemberg <>,
        Mateusz Nowak <>,
        Yuliy Izrailov <>,
        Jaehoon Chung <>,
        Dong Aisheng <>,
        Das Asutosh <>,
        Zhangfei Gao <>,
        Sahitya Tummala <>,
        Harjani Ritesh <>,
        Venu Byravarasu <>,
        Shawn Lin <>,
        Bartlomiej Zolnierkiewicz <>,
        Christoph Hellwig <>
Subject: Re: [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

Powered by blists - more mailing lists