[PATCH v2 5.10] net: defer final 'struct net' free in netns dismantle

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

 



I think a better approach will be to backport 41467d2ff4df 
("net: net_namespace: Optimize the code") as a prerequisite for
0f6ede9fbc74 ("net: defer final 'struct net' free in netns 
dismantle") otherwise we may endup with refcount underflow whenever
"net_free" & "net_drop_ns" called sequentially as with the current 
version of the backport both of them apparently call 
refcount_dec_and_test(&ns->passive). In 41467d2ff4df
("net: net_namespace: Optimize the code") there are two
hunks that aren't directly related to this backport however 
these are removing duplicate code into a separate function 
which will likely help with future backports. I have backported
both commits cleanly on 5.10.y and didn't see any issues and I 
am currently testing the same on 5.4 as it's also missing both 
commits.




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux