On Fri, Jul 02, 2021 at 01:05:39PM +0200, Martin Pieuchot wrote: > Looks good to me. Grabbing solock() after calling pledge_socket() in > sys_connect(), like it is already done in sys_bind(), means it is ok > to read this field w/o lock. Is it true?
I guess it is good enough. If MP rules are followed stictly, every access without lock or memory barrier is problematic. But here the SS_DNS flag is set during socket creation. Also racing against pledge does not look like something we must be aware of. > ok mpi@ for this diff because it makes things coherent and fix a bug, Thanks, commited. I also have a regress test for that. But I will wait a bit until the fix is in snapshots so people wont't crash their machines. bluhm
