From: Baruch Siach <baruch@tkos.co.il>
To: David Miller <davem@davemloft.net>
Cc: mw@semihalf.com, netdev@vger.kernel.org,
thomas.petazzoni@free-electrons.com,
gregory.clement@free-electrons.com
Subject: Re: [PATCH 1/2] net: mvpp2: don't bring up on MAC address set
Date: Thu, 10 Nov 2016 20:08:15 +0200 [thread overview]
Message-ID: <20161110180815.43zml2gjwkqq4utl@tarshish> (raw)
In-Reply-To: <20161110.115718.1744727306693534849.davem@davemloft.net>
Hi David,
On Thu, Nov 10, 2016 at 11:57:18AM -0500, David Miller wrote:
> From: Baruch Siach <baruch@tkos.co.il>
> Date: Wed, 9 Nov 2016 14:56:33 +0200
>
> > Current .ndo_set_mac_address implementation brings up the interface when revert
> > to original address after failure succeeds. Fix this.
> >
> > Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> > ---
> > Untested; I don't have the hardware.
>
> The code which updates the parser should keep the existing
> state if any part of the update fails.
>
> This means it must attempt all memory allocations and whatever other
> resource acquisition is necessary, and only after all of those
> operations succeed and no more error cases are possible should it
> update the tables and release the old entry.
>
> In other worse, this whole mechanism must move to a proper "prepare
> --> commit" model of making changes.
Doing so is possible, but requires much larger changes in the driver code.
This patch makes the minimal fix to a clear bug. It should be an improvement
over the current state.
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
prev parent reply other threads:[~2016-11-10 18:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-09 12:56 [PATCH 1/2] net: mvpp2: don't bring up on MAC address set Baruch Siach
2016-11-09 12:56 ` [PATCH 2/2] net: mvpp2: simplify MAC address set code Baruch Siach
2016-11-09 13:22 ` [PATCH 1/2] net: mvpp2: don't bring up on MAC address set Thomas Petazzoni
2016-11-09 18:49 ` Baruch Siach
2016-11-10 16:57 ` David Miller
2016-11-10 18:08 ` Baruch Siach [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161110180815.43zml2gjwkqq4utl@tarshish \
--to=baruch@tkos.co.il \
--cc=davem@davemloft.net \
--cc=gregory.clement@free-electrons.com \
--cc=mw@semihalf.com \
--cc=netdev@vger.kernel.org \
--cc=thomas.petazzoni@free-electrons.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox