[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20130317.143210.2198141328498450246.davem@davemloft.net>
Date: Sun, 17 Mar 2013 14:32:10 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: stephen@...workplumber.org
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH net-next] qdisc: propagate errors from qdisc_create_dflt
From: Stephen Hemminger <stephen@...workplumber.org>
Date: Sun, 17 Mar 2013 09:36:22 -0700
> This patch improves the error handling of default queuing discipline.
>
> The function qdisc_create_dflt masks the error code from the underlying
> qdisc init function. Use IS_ERR() to propagate it back out to the callers.
>
> Change the error handling of several qdisc's to report error rather than
> silently substituting a noop qdisc. Change the log level of failure to
> setup queue discipline from info to notice, since it is a real error.
>
> In current kernel, the only likely error from pfifo_fast is out of memory,
> but the API shouldn't be hiding errors.
>
> Signed-off-by: Stephen Hemminger <stephen@...workplumber.org>
If you're going to do this, you must change all the call sites so that
they don't leave error pointers in the various datastructures.
So code that does:
foo->member = qdisc_create_dflt();
must now go:
var = qdisc_create_dflt();
if (IS_ERR(var))
goto out_err;
foo->member = var;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists