Re: [PATCH v2 01/46] mtdpart: Propagate _get/put_device()

From: Karl Beldan
Date: Wed Dec 28 2016 - 13:55:26 EST


On Thu, Dec 15, 2016 at 08:51:06AM +0100, Richard Weinberger wrote:
> On 15.12.2016 08:09, Karl Beldan wrote:
> >>> I think this should also go into -stable.
> >>
> >> Why? Do you have real use cases that are broken by this? I understand
> >
> > I do, some code adding partitions on a gluebi master.
>
> What exactly are you doing?
>
> >> this is a problem, but I'm curious on how this satisfies the stable
> >> rules.
> >>
> >> Also, note that this isn't a regression; it's been broken forever and
> >> apparently no one noticed. IMO that raises the bar a bit (but not
> >> impossibly so) for -stable.
> >>
> >
> > I just encountered the bug yesterday and yes it is obvious it has been
> > broken forever.
> > I don't have strong opinion about these things so no worries.
>
> If existing stuff is broken, and you can trigger it. Please let us
> know. Then it should go into -stable.
>

I thought that's what I already did.

Anyways, it didn't require much imagination to come up with a script
triggering the issue so here you are:

#{{

modprobe nandsim
modprobe gluebi
ubiattach -p /dev/mtd1 -b 1
ubimkvol /dev/ubi0 -S 4 -N vol_0
mtdpart add /dev/mtd2 vol_0_0 0 0x1000
tail -F /dev/mtd2 &
while :; do dd bs=1 count=1 if=/dev/mtd3 >/dev/null 2>&1 || break; done
kill -9 %1 # Oops

#}}


Karl