> -----Original Message-----
> From: fcoe-devel [mailto:[email protected]] On Behalf Of
> Hannes Reinecke
> Sent: Wednesday, January 21, 2015 11:05 PM
> To: [email protected]
> Subject: Re: [Open-FCoE] long existing fipvlan segfault issues?
>
> On 01/21/2015 10:03 PM, Chris Leech wrote:
> > I'm looking at segfaults with fipvlan, and there seem to be some
> > serious issues with patches applied Dec 2 2013.
> >
> > Is anyone testing fipvlan at all? I'm worried that these got in, but
> > more so that they've been undetected for so long.
> >
> Hmm. Well, we used to. But apparently without that bit of code ...
>
It would hit only if vlan already exist and somebody tries to create and start
fcoe instance using fipvlan in that case, which typically folks may not do and
that could be the reason being un-detected and so far no complains since
fipvlan primarly started as "diagnostic tool" and then extended to be used
BFS to start FCoE instance after creating vlan.
Applied patch in 2013 would have slipped in by me also as I would have done
simple fipvlan test on that patch before applying it and that must have passed
back then also since simple fipvlan still works with current tip.
#fipvlan n0
Fibre Channel Forwarders Discovered
interface | VLAN | FCF MAC
------------------------------------------
n0 | 246 | 00:0d:ec:a3:3a:80
May be to test these options also going forward.
Thanks Chris for finding these issues and getting their fixes.
Vasu
> > If you use the vlan create option, it will segfault in
> > create_and_start_vlan() at line 647
> >
> >> } else {
> >> vlan = lookup_vlan(fcf->ifindex, fcf->vlan);
> >> if (vlan) {
> >> FIP_LOG_DBG("VLAN %s.%d already exists as %s\n",
> >> real_dev->ifname, fcf->vlan, vlan->ifname);
> >> return 0;
> >
> > if vlan already exists, this exits
> > (so we can't start fcoe on an existing vlan dev either?)
> >
> >> }
> >> snprintf(vlan_name, IFNAMSIZ, "%s.%d%s",
> >> real_dev->ifname, fcf->vlan, config.suffix);
> >> rc = vlan_create(fcf->ifindex, fcf->vlan, vlan_name);
> >> if (rc < 0) {
> >> printf("Failed to create VLAN device %s\n\t%s\n",
> >> vlan_name, strerror(-rc));
> >> return rc;
> >> }
> >> printf("Created VLAN device %s\n", vlan_name);
> >
> > created, but vlan variable still NULL
> >
> >> }
> >> if (!config.start)
> >> return rc;
> >>
> >> if (!vlan->running) {
> >
> > segfault on NULL dereference
> >
> Ah. The older version had this function inlined, and was just doing a
> 'continue' after the printf.
>
> If so, this patch should fix it:
>
> diff --git a/fipvlan.c b/fipvlan.c
> index cc71412..34725bf 100644
> --- a/fipvlan.c
> +++ b/fipvlan.c
> @@ -634,12 +634,12 @@ create_and_start_vlan(struct fcf *fcf, bool vn2vn)
> snprintf(vlan_name, IFNAMSIZ, "%s.%d%s",
> real_dev->ifname, fcf->vlan, config.suffix);
> rc = vlan_create(fcf->ifindex, fcf->vlan, vlan_name);
> - if (rc < 0) {
> + if (rc < 0)
> printf("Failed to create VLAN device %s\n\t%s\n",
> vlan_name, strerror(-rc));
> - return rc;
> - }
> - printf("Created VLAN device %s\n", vlan_name);
> + else
> + printf("Created VLAN device %s\n", vlan_name);
> + return rc;
> }
> if (!config.start)
> return rc;
>
>
> (minus linebreaks, of course)
>
> Cheers,
>
> Hannes
> --
> Dr. Hannes Reinecke zSeries & Storage
> [email protected] +49 911 74053 688
> SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
> GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB 21284
> (AG Nürnberg) _______________________________________________
> fcoe-devel mailing list
> [email protected]
> http://lists.open-fcoe.org/mailman/listinfo/fcoe-devel
_______________________________________________
fcoe-devel mailing list
[email protected]
http://lists.open-fcoe.org/mailman/listinfo/fcoe-devel