From: David Miller <davem@davemloft.net>
To: tgraf@infradead.org
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next-2.6]: rtnl: make link af-specific updates atomic
Date: Sat, 27 Nov 2010 22:56:28 -0800 (PST) [thread overview]
Message-ID: <20101127.225628.39167961.davem@davemloft.net> (raw)
In-Reply-To: <20101122113154.GA16382@canuck.infradead.org>
From: Thomas Graf <tgraf@infradead.org>
Date: Mon, 22 Nov 2010 06:31:54 -0500
> As David pointed out correctly, updates to af-specific attributes
> are currently not atomic. If multiple changes are requested and
> one of them fails, previous updates may have been applied already
> leaving the link behind in a undefined state.
>
> This patch splits the function parse_link_af() into two functions
> validate_link_af() and set_link_at(). validate_link_af() is placed
> to validate_linkmsg() check for errors as early as possible before
> any changes to the link have been made. set_link_af() is called to
> commit the changes later.
>
> This method is not fail proof, while it is currently sufficient
> to make set_link_af() inerrable and thus 100% atomic, the
> validation function method will not be able to detect all error
> scenarios in the future, there will likely always be errors
> depending on states which are f.e. not protected by rtnl_mutex
> and thus may change between validation and setting.
>
> Also, instead of silently ignoring unknown address families and
> config blocks for address families which did not register a set
> function the errors EAFNOSUPPORT respectively EOPNOSUPPORT are
> returned to avoid comitting 4 out of 5 update requests without
> notifying the user.
>
> Signed-off-by: Thomas Graf <tgraf@infradead.org>
Applied, thanks Thomas.
prev parent reply other threads:[~2010-11-28 6:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-22 11:31 [PATCH net-next-2.6]: rtnl: make link af-specific updates atomic Thomas Graf
2010-11-28 6:56 ` David Miller [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=20101127.225628.39167961.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=tgraf@infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).