[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1529276779.2289.243.camel@codethink.co.uk>
Date: Mon, 18 Jun 2018 00:06:19 +0100
From: Ben Hutchings <ben.hutchings@...ethink.co.uk>
To: Govindarajulu Varadarajan <gvaradar@...co.com>
Cc: stable@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
Sasha Levin <alexander.levin@...rosoft.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4.4 234/268] enic: enable rq before updating rq
descriptors
On Mon, 2018-05-28 at 12:03 +0200, Greg Kroah-Hartman wrote:
> 4.4-stable review patch. If anyone has any objections, please let me know.
>
> ------------------
>
> From: Govindarajulu Varadarajan <gvaradar@...co.com>
>
> [ Upstream commit e8588e268509292550634d9a35f2723a207683b2 ]
[...]
> --- a/drivers/net/ethernet/cisco/enic/enic_main.c
> +++ b/drivers/net/ethernet/cisco/enic/enic_main.c
[...]
> @@ -1765,8 +1765,12 @@ static int enic_open(struct net_device *
> > return 0;
>
> err_out_free_rq:
> - for (i = 0; i < enic->rq_count; i++)
> + for (i = 0; i < enic->rq_count; i++) {
> + err = vnic_rq_disable(&enic->rq[i]);
> + if (err)
> + return err;
This added code is wrong: it overwrites the error code that was
previously in err. If vnic_rq_disable() succeeds, enic_open() will
wrongly return 0. If vnic_rq_disable() fails, I still don't think it
makes sense to skip the remaining cleanup actins.
Ben.
> vnic_rq_clean(&enic->rq[i], enic_free_rq_buf);
> + }
> enic_dev_notify_unset(enic);
> err_out_free_intr:
> enic_unset_affinity_hint(enic);
>
>
>
--
Ben Hutchings, Software Developer Codethink Ltd
https://www.codethink.co.uk/ Dale House, 35 Dale Street
Manchester, M1 2HF, United Kingdom
Powered by blists - more mailing lists