[PATCH 1/2] mtd: Make sure MTD objects always have a valid debugfs dir
Richard Weinberger
richard at nod.at
Wed Oct 4 07:26:21 PDT 2017
Am Mittwoch, 4. Oktober 2017, 15:56:53 CEST schrieb Boris Brezillon:
> On Wed, 4 Oct 2017 15:53:42 +0200
>
> Boris Brezillon <boris.brezillon at free-electrons.com> wrote:
> > On Wed, 4 Oct 2017 15:52:38 +0200
> >
> > Boris Brezillon <boris.brezillon at free-electrons.com> wrote:
> > > Master MTD devices are not registered to MTD subsystem if they are
> > > exposing MTD partitions unless the CONFIG_MTD_PARTITIONED_MASTER option
> > > is enabled.
> > >
> > > This lead to a weird situation where some MTD device drivers are trying
> > > to add debugfs files to the master MTD device, but this device has no
> > > valid debugfs directory.
> > >
> > > Rework the core logic to do most of the MTD registration steps
> > > (including debugfs dir creation) except the registration to the device
> > > model, so that master devices are never exposed to the outside world
> > > but are still able to expose debugfs entries.
> > >
> > > These devices will be exposed as mtd-hiddenX in the mtd debugfs dir.
> > > Note that X is unique within the hidden MTD device pool but can collide
> > > with ids of exposed MTD devs.
> > >
> > > This commit fixes a bug introduced by commit e8e3edb95ce6 ("mtd: create
> > > per-device and module-scope debugfs entries") which is preventing
> > > nandsim from loading when CONFIG_DEBUG_FS is enabled.
> > >
> > > Fixes: e8e3edb95ce6 ("mtd: create per-device and module-scope debugfs
> > > entries")>
> > Oops, I forgot
> >
> > Reported-by: Richard Weinberger <richard at nod.at>
>
> and
>
> Cc: <stable at vger.kernel.org>
>
> :-/
Tested-by: Richard Weinberger <richard at nod.at>
Thanks,
//richard
More information about the linux-mtd
mailing list