[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdZeGXTNesoBZ5DRroHeEmVS+fkBW0BOgN69X3jXWhgSWA@mail.gmail.com>
Date: Thu, 23 Nov 2017 14:22:34 +0100
From: Linus Walleij <linus.walleij@...aro.org>
To: Adrian Hunter <adrian.hunter@...el.com>
Cc: Ulf Hansson <ulf.hansson@...aro.org>,
linux-mmc <linux-mmc@...r.kernel.org>,
linux-block <linux-block@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
Bough Chen <haibo.chen@....com>,
Alex Lemberg <alex.lemberg@...disk.com>,
Mateusz Nowak <mateusz.nowak@...el.com>,
Yuliy Izrailov <Yuliy.Izrailov@...disk.com>,
Jaehoon Chung <jh80.chung@...sung.com>,
Dong Aisheng <dongas86@...il.com>,
Das Asutosh <asutoshd@...eaurora.org>,
Zhangfei Gao <zhangfei.gao@...il.com>,
Sahitya Tummala <stummala@...eaurora.org>,
Harjani Ritesh <riteshh@...eaurora.org>,
Venu Byravarasu <vbyravarasu@...dia.com>,
Shawn Lin <shawn.lin@...k-chips.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
Christoph Hellwig <hch@....de>
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 <adrian.hunter@...el.com> 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 <adrian.hunter@...el.com>
Reviewed-by: Linus Walleij <linus.walleij@...aro.org>
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.
Yours,
Linus Walleij
Powered by blists - more mailing lists