Skip to content

Commit

Permalink
ovsdb: transaction: Remove incorrect transaction abort in pre-commit.
Browse files Browse the repository at this point in the history
Pre-commit must not abort the transaction, otherwise the upper layers
may crash accessing it.  E.g. ovsdb_trigger_try() checks the state of
the transaction after trying to commit it.

This particular failure can't actually happen, because the function
determine_changes() can't fail.  However, the code is still wrong and
a bit misleading, so should be fixed.

Fixes: 5317898 ("ovsdb: Add support for online schema conversion.")
Signed-off-by: Ilya Maximets <[email protected]>
  • Loading branch information
igsilya committed Jul 22, 2024
1 parent 8f3d6c1 commit 93caaf7
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion ovsdb/transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -1090,7 +1090,6 @@ ovsdb_txn_precommit(struct ovsdb_txn *txn)
* was really a no-op. */
error = for_each_txn_row(txn, determine_changes);
if (error) {
ovsdb_txn_abort(txn);
return OVSDB_WRAP_BUG("can't happen", error);
}
if (ovs_list_is_empty(&txn->txn_tables)) {
Expand Down

0 comments on commit 93caaf7

Please sign in to comment.