Re: [GIT PULL] percpu fix for v5.9-rc6

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 18, 2020 at 1:02 PM Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:
>
> I suppose it's not really necessary, we could do offsetof here, right?

Yup, that would make a lot more sense.

But right now, the sizeof() obviously silently works.

As do a number of other fairly nonsensical things, like assigning a struct etc.

And yes, I realize we may well do that too. But I think that's a
dangerous pattern too, ie doing

   *a = *b;

silently works, and copies everything but the final array.

And yes - none of this is _worse_ than using zero-sized arrays, but
the point is that it isn't better either.

            Linus




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux