On 08/04/20(Wed) 12:11, Vitaliy Makkoveev wrote:
> On Wed, Apr 08, 2020 at 09:51:45AM +0200, Martin Pieuchot wrote:
> [...] 
> As I see (pseudo code):
> [...] 
> So, I fixed this issue :)

We fix what we see.  Bugs are always in the unseen :)  This mess is
clearly complicated.  Mixing 3 different locks in different orders
with different pieces of code is complex.

So let's ask this question again: what is the NET_LOCK() protecting
in this code?  Is it needed?  What is the `pppx_ifs_lk' protecting?
>From whom?  Are they needed or do they introduce more problem than they
are solving?  We see the problem of context switch breaking atomicity
of code, the simplest way to get rid of this problem is to get rid of
the locks, or at least reduce their number.

So does one see how useless is `pppx_ifs_lk' since all the code it
"protects" is executed under KERNEL_LOCK() and doesn't contain any
context switch?

Historically the NET_LOCK() has been "pushed" under all pseudo-device
ioctl(2).  This was a mechanical change until somebody figures out if
it is needed or not.  That's the real question.  So let's ask it :o)

Reply via email to