Date: Tue, 18 Jul 2017 18:04:24 -0700 From: Vincenzo Maffione <v.maffione@gmail.com> To: Luiz Otavio O Souza <lists.br@gmail.com> Cc: Marius Strobl <marius@freebsd.org>, hps@freebsd.org, ae@freebsd.org, FreeBSD Net <freebsd-net@freebsd.org>, "Eggert, Lars" <lars@netapp.com> Subject: Re: NULL pointer dereference bug triggered by netmap Message-ID: <CA%2B_eA9hUaoJ=qLoqDDyx-8cbs%2BiZeoXUWR%2BvOjgZ0VqtusyCTw@mail.gmail.com> In-Reply-To: <CAB=2f8zaFmF_mW3wq_zgp9R47_X4Q%2B=1c53qStUFm=vM8rRwXA@mail.gmail.com> References: <CA%2B_eA9goJ6j=q6UO-%2BfOt-aHVgFmujQfH8WfYEHf9=PQobdwHg@mail.gmail.com> <20170705110512.GA28058@alchemy.franken.de> <CA%2B_eA9h138BhHaeyEojzM3UFc__GWxV72uVSHCWVWw-6CbnGsw@mail.gmail.com> <20170711200510.GB60651@alchemy.franken.de> <CA%2B_eA9jC6WFDk-96XDzCEZqea2_E3N8eL9_fHvevtVLXU40dHg@mail.gmail.com> <CAB=2f8zaFmF_mW3wq_zgp9R47_X4Q%2B=1c53qStUFm=vM8rRwXA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, Looks good to me, although I'm not sure whether if_transmit should assert(mbuf == NULL). Couldn't we just drop the mbuf if we receive it? Thanks, Vincenzo 2017-07-18 10:43 GMT-07:00 Luiz Otavio O Souza <lists.br@gmail.com>: > On 12 July 2017 at 02:19, Vincenzo Maffione wrote: > > Yes. > > > > Actually, we would also need one beteween the following two options: > > 1) Implementing a dummy if_start() for if_loop.c > > 2) Prevent netmap from using if_loop. > > Hi, > > Please, check the attached patches. > > Luiz > > > > > 2017-07-11 22:05 GMT+02:00 Marius Strobl <marius@freebsd.org>: > > > >> On Thu, Jul 06, 2017 at 02:19:42PM -0700, Vincenzo Maffione wrote: > >> > Sure, can anyone commit this? > >> > >> The addition of KASSERTs like the below one to if_handoff() and > >> if_start()? Sure. > >> > >> Marius > >> > >> > > >> > Il 5 lug 2017 4:05 AM, "Marius Strobl" <marius@freebsd.org> ha > scritto: > >> > > >> > > On Mon, Jul 03, 2017 at 05:08:09PM +0200, Vincenzo Maffione wrote: > >> > > > Details here: > >> > > > > >> > > > https://github.com/luigirizzo/netmap/issues/322 > >> > > > > >> > > > Is it acceptable to commit the proposed patch? > >> > > > >> > > As suggested by hselasky@, the outliner problem at hand is better > >> solved > >> > > by a dummy if_start method in order to not hurt the fast-path. > Thus, if > >> > > anything at all, a KASSERT(ifp->if_start != NULL, "no if_start > method") > >> > > should be added to if_handoff() and if_start(). > -- Vincenzo Maffione
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2B_eA9hUaoJ=qLoqDDyx-8cbs%2BiZeoXUWR%2BvOjgZ0VqtusyCTw>