[dm-devel] [git pull] device mapper changes for 4.18

Linus Torvalds torvalds at linux-foundation.org
Tue Jun 5 15:53:14 UTC 2018


On Tue, Jun 5, 2018 at 1:59 AM Peter Zijlstra <peterz at infradead.org> wrote:
>
> We've had a whole bunch of broken. We fixed a pile of them a few
> years back but I'm sure that if you look hard you can still find a few.
>
> The one commit I can readily find is:
>
>   91f65facba5a ("iommu/amd: Fix amd_iommu_free_device()")

Ugh, ok, I stand corrected.

These things definitely are bugs and they aren't even because of some
"old model", because we've pretty much always had the "loop to wait"
rule.

Even going back to linux-0.01, when we had that "sleep_on()" primitive
that is really bad (because of fundamental races), we had code like
this:

    static inline void wait_on_buffer(struct buffer_head * bh)
    {
        cli();
        while (bh->b_lock)
                sleep_on(&bh->b_wait);
        sti();
    }

and the above wasn't some fluke that I searched for, they're all that
way (and by "all" I mean "the first three I looked at", which probably
means that if I had looked at a fourth, I'd have found somebody
violating the "loop on condition" rule ;)

               Linus




More information about the dm-devel mailing list