tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Dealing with strange disk devices
On Mon, 28 Oct 2019 at 14:23, Mouse <mouse%rodents-montreal.org@localhost> wrote:
>
> > To provide a bit more context: this code path with the potential
> > division by zero has been in the tree for over a decade; [...]
>
> I once found I had a disk that was just broken enough to appear as a
> disk, butit reported itself as having zero something (zero
> sectors/track? zero tracks/cylinder? whatever) which provoked a
> divide-by-zero. I of course patched this in my tree. (This was in
> 2012, but it was under 1.4T, so I don't think I bothered reporting it
> anywhere. I don't recall trying the same disk on something more
> recent, though I also don't recall why not. I don't find comparable
> commits in my other trees, so if I did try it, it presumably didn't
> crash the relevant kernel(s).)
>
> So, while I agree that there are vanishingly small numbers of "real"
> devices showing such behaviour, I also think it a bug for attaching a
> disk to crash the kernel, even if the disk is broken. I see changes of
> this sort as defense against broken disks if nothing else.
I agree. The kernel should not crash on such disks anymore — it is my
understanding that this (or similar) crash is fixed by my patch that's
been committed a month ago.. If you still have any such disks, and
doing the multiply-or-divide trick would support them fully, then I'm
all for making such a change. However, if such disks don't exist, I
don't think it's fair to add untested code which might provoke other
panics or data loss in some other paths.
C.
Home |
Main Index |
Thread Index |
Old Index