Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Issue 3980005: AU: Don't mark booted kernel good if we've applied an update. (Closed)

Created:
10 years, 2 months ago by petkov
Modified:
9 years, 7 months ago
Reviewers:
adlr
CC:
chromium-os-reviews_chromium.org, adlr, petkov
Visibility:
Public.

Description

AU: Don't mark booted kernel good if we've applied an update. Otherwise, we may end up reverting the update. BUG=7553 TEST=unit tests; tested on device with modified chromeos-setgoodkernel script. Change-Id: I52bd025947ddfc9146644fe9449a4446ea679b3e Committed: http://chrome-svn/viewvc/chromeos?view=rev&revision=eee26ee

Patch Set 1 #

Total comments: 1

Patch Set 2 : avoid race conditions #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -3 lines) Patch
M main.cc View 1 2 chunks +17 lines, -3 lines 1 comment Download

Messages

Total messages: 6 (0 generated)
petkov
10 years, 2 months ago (2010-10-21 23:49:02 UTC) #1
adlr
http://codereview.chromium.org/3980005/diff/1/2 File main.cc (right): http://codereview.chromium.org/3980005/diff/1/2#newcode150 main.cc:150: g_timeout_add_seconds(45, &chromeos_update_engine::UpdateBootFlags, NULL); race condition: - status is DOWNLOADING ...
10 years, 2 months ago (2010-10-21 23:51:12 UTC) #2
adlr
err, i didn't quite get that race condition exactly right, but the point is we ...
10 years, 2 months ago (2010-10-21 23:52:42 UTC) #3
petkov
Yeah, I thought this was unlikely but true -- it could happen if the user ...
10 years, 2 months ago (2010-10-21 23:57:55 UTC) #4
petkov
PTAL. I did some basic testing and I'll do some more testing tomorrow. I'll push ...
10 years, 2 months ago (2010-10-22 00:10:35 UTC) #5
adlr
10 years, 2 months ago (2010-10-22 00:45:28 UTC) #6
LGTM

http://codereview.chromium.org/3980005/diff/7001/8001
File main.cc (right):

http://codereview.chromium.org/3980005/diff/7001/8001#newcode49
main.cc:49: if (attempter->status() != UPDATE_STATUS_IDLE) {
since it's single threaded, and this and postinst are synchronous, I think it's
okay to go ahead and call setgoodkernel when status != NEED_REBOOT or
FINALIZING, but your version makes fewer requirements about things being
synchronous, which is good.

Powered by Google App Engine
This is Rietveld 408576698