diff options
author | Thomas Graf <tgraf@infradead.org> | 2010-11-22 01:31:54 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-27 22:56:08 -0800 |
commit | cf7afbfeb8ceb0187348d0a1a0db61305e25f05f (patch) | |
tree | 8b1c07c8ae6a5b3f6f050d3286b53b3d7d72c858 /firmware/emi26/firmware.HEX | |
parent | 89bf67f1f080c947c92f8773482d9e57767ca292 (diff) | |
download | op-kernel-dev-cf7afbfeb8ceb0187348d0a1a0db61305e25f05f.zip op-kernel-dev-cf7afbfeb8ceb0187348d0a1a0db61305e25f05f.tar.gz |
rtnl: make link af-specific updates atomic
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'firmware/emi26/firmware.HEX')
0 files changed, 0 insertions, 0 deletions