Date: Sun, 23 Jan 2022 19:38:39 +0100 From: Wojciech Macek <wma@semihalf.com> To: Gleb Smirnoff <glebius@freebsd.org> Cc: Kristof Provost <kp@freebsd.org>, Wojciech Macek <wma@freebsd.org>, src-committers <src-committers@freebsd.org>, "<dev-commits-src-all@freebsd.org>" <dev-commits-src-all@freebsd.org>, dev-commits-src-main@freebsd.org Subject: Re: git: 9ce46cbc95d7 - main - ip_mroute: move ip_mrouter_done outside lock Message-ID: <CANsEV8faJFZ5m7Edxttuqfj-9KLPgi93OFN%2BhOcLupG%2BDMfC4A@mail.gmail.com> In-Reply-To: <CANsEV8cEWc9GsTZk%2BVm-_%2B9rsU-=yXLjRkZZz--dg7-ZJRgOnw@mail.gmail.com> References: <202201210519.20L5J1mJ029323@gitrepo.freebsd.org> <7A991003-0F24-4C8C-81FD-84F39FC78D8A@FreeBSD.org> <C25EE57B-BE5A-4BC8-AD00-C8D0D582D073@FreeBSD.org> <CANsEV8cmZcQKh3U8w2S37cg9heFd=icuEmF7dVwrE486OM3Yug@mail.gmail.com> <Ye2FOvi32Xu23qIB@FreeBSD.org> <CANsEV8cEWc9GsTZk%2BVm-_%2B9rsU-=yXLjRkZZz--dg7-ZJRgOnw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000cfca3a05d644298c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable This commit, moving ip_mroutet_done outside a lock is only to silence a warning when invariants are enabled - no functional changes to the root problem were made here. Wojtek niedz., 23 sty 2022, 19:24 u=C5=BCytkownik Wojciech Macek <wma@semihalf.com= > napisa=C5=82: > This is an orginal fix. The issue was visible due to race between ip > input/output and mrouter uninit. > https://reviews.freebsd.org/D29946 > > niedz., 23 sty 2022, 17:41 u=C5=BCytkownik Gleb Smirnoff <glebius@freebsd= .org> > napisa=C5=82: > >> On Sat, Jan 22, 2022 at 08:50:54AM +0100, Wojciech Macek wrote: >> W> I will prepare a fix later today. Basically, the whole "if" condition >> must >> W> be inside rwlock block to avoid race during module unload. >> W> Maybe adding else and rwunlock in rip_detach will suffice.... I need >> to try >> W> it out. >> >> May I ask you to post a review and add me as reviewer? Please also inclu= de >> a description of the problem we are fighting with. At least, a short >> version >> of it, for example "fix race between module unload and packet received". >> >> -- >> Gleb Smirnoff >> > --000000000000cfca3a05d644298c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"auto">This commit, moving ip_mroutet_done outside a lock is onl= y to silence a warning when invariants are enabled - no functional changes = to the root problem were made here.<div dir=3D"auto"><br></div><div dir=3D"= auto">Wojtek</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" cla= ss=3D"gmail_attr">niedz., 23 sty 2022, 19:24 u=C5=BCytkownik Wojciech Macek= <<a href=3D"mailto:wma@semihalf.com">wma@semihalf.com</a>> napisa=C5= =82:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;= border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"auto">This is an o= rginal fix. The issue was visible due to race between ip input/output and m= router uninit.=C2=A0<div dir=3D"auto"><a href=3D"https://reviews.freebsd.or= g/D29946" target=3D"_blank" rel=3D"noreferrer">https://reviews.freebsd.org/= D29946</a><br></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" c= lass=3D"gmail_attr">niedz., 23 sty 2022, 17:41 u=C5=BCytkownik Gleb Smirnof= f <<a href=3D"mailto:glebius@freebsd.org" target=3D"_blank" rel=3D"noref= errer">glebius@freebsd.org</a>> napisa=C5=82:<br></div><blockquote class= =3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd= ing-left:1ex">On Sat, Jan 22, 2022 at 08:50:54AM +0100, Wojciech Macek wrot= e:<br> W> I will prepare a fix later today. Basically, the whole "if"= condition must<br> W> be inside rwlock block to avoid race during module unload.<br> W> Maybe adding else and rwunlock in rip_detach will suffice.... I need = to try<br> W> it out.<br> <br> May I ask you to post a review and add me as reviewer? Please also include<= br> a description of the problem we are fighting with. At least, a short versio= n<br> of it, for example "fix race between module unload and packet received= ".<br> <br> -- <br> Gleb Smirnoff<br> </blockquote></div> </blockquote></div> --000000000000cfca3a05d644298c--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANsEV8faJFZ5m7Edxttuqfj-9KLPgi93OFN%2BhOcLupG%2BDMfC4A>