From patchwork Mon Feb 10 21:07:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 24420 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f69.google.com (mail-oa0-f69.google.com [209.85.219.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DEC4920143 for ; Mon, 10 Feb 2014 21:07:43 +0000 (UTC) Received: by mail-oa0-f69.google.com with SMTP id h16sf30835941oag.0 for ; Mon, 10 Feb 2014 13:07:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=zMIQ9KalLLA7UU3lW1EsKH4qIZEbF9M5joNqE3LRS0g=; b=OI68hYlKXcKz1Hm5SoCpCF04vsIxJUJIv3dVV5kPj/tXcr72I98k587VzHFOpVETHJ EGkaSdKk8b/L/g2XlXwxLbhyVfiNifXQ2YW8dwVjOYRdFa6ctuIKEGG4GjBMYbzx6gZo r59WTge2s7rxBzBaudSVOtbFm6WpjFMdMwrqBfhIMLxQNW3v61AepNStm8l+8n+sBlml rNnybDmUFSPbMV+FRkkPL0h8LCK7+nRg61MR7iTorDUuWhObfu5iyduCo023Jd1KkgpI vCsoDj8y9yIi2pQ8XWKtgMjQ4Hwxfc0lVQcvRp4Tlw66g/vUNLrqX9O5jNK7YIal8Yl5 HEBA== X-Gm-Message-State: ALoCoQmkmaMiJwA9Z7qeVcntZMdb5SVwmWxpvamJbSynPeS2dJsYgv44nfB/hxJNjUGECe3C4CSc X-Received: by 10.182.87.225 with SMTP id bb1mr13226737obb.16.1392066462787; Mon, 10 Feb 2014 13:07:42 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.81.20 with SMTP id e20ls365973qgd.58.gmail; Mon, 10 Feb 2014 13:07:42 -0800 (PST) X-Received: by 10.58.69.111 with SMTP id d15mr25272541veu.3.1392066462620; Mon, 10 Feb 2014 13:07:42 -0800 (PST) Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by mx.google.com with ESMTPS id p9si5141470vdv.70.2014.02.10.13.07.42 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Feb 2014 13:07:42 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.179; Received: by mail-vc0-f179.google.com with SMTP id lh14so5153348vcb.24 for ; Mon, 10 Feb 2014 13:07:42 -0800 (PST) X-Received: by 10.52.155.66 with SMTP id vu2mr40526vdb.50.1392066462523; Mon, 10 Feb 2014 13:07:42 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp197769vcz; Mon, 10 Feb 2014 13:07:42 -0800 (PST) X-Received: by 10.66.250.202 with SMTP id ze10mr6077698pac.153.1392066461507; Mon, 10 Feb 2014 13:07:41 -0800 (PST) Received: from mail-pb0-f47.google.com (mail-pb0-f47.google.com [209.85.160.47]) by mx.google.com with ESMTPS id fl7si16641932pad.55.2014.02.10.13.07.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Feb 2014 13:07:41 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.47 is neither permitted nor denied by best guess record for domain of john.stultz@linaro.org) client-ip=209.85.160.47; Received: by mail-pb0-f47.google.com with SMTP id rp16so6736151pbb.6 for ; Mon, 10 Feb 2014 13:07:41 -0800 (PST) X-Received: by 10.68.112.164 with SMTP id ir4mr11041006pbb.153.1392066461113; Mon, 10 Feb 2014 13:07:41 -0800 (PST) Received: from localhost.localdomain (c-67-170-153-23.hsd1.or.comcast.net. [67.170.153.23]) by mx.google.com with ESMTPSA id bz4sm45596387pbb.12.2014.02.10.13.07.39 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Feb 2014 13:07:40 -0800 (PST) From: John Stultz To: stable Cc: John Stultz , Sasha Levin , Thomas Gleixner , Prarit Bhargava , Richard Cochran , Ingo Molnar Subject: [PATCH 6/7] 3.13.y: timekeeping: Fix missing timekeeping_update in suspend path Date: Mon, 10 Feb 2014 13:07:23 -0800 Message-Id: <1392066444-4940-7-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1392066444-4940-1-git-send-email-john.stultz@linaro.org> References: <1392066444-4940-1-git-send-email-john.stultz@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: john.stultz@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.179 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This is a 3.13-stable backport of 330a1617b0a6268d427aa5922c94d082b1d3e96d Since 48cdc135d4840 (Implement a shadow timekeeper), we have to call timekeeping_update() after any adjustment to the timekeeping structure in order to make sure that any adjustments to the structure persist. In the timekeeping suspend path, we udpate the timekeeper structure, so we should be sure to update the shadow-timekeeper before releasing the timekeeping locks. Currently this isn't done. In most cases, the next time related code to run would be timekeeping_resume, which does update the shadow-timekeeper, but in an abundence of caution, this patch adds the call to timekeeping_update() in the suspend path. Cc: Sasha Levin Cc: Thomas Gleixner Cc: Prarit Bhargava Cc: Richard Cochran Cc: Ingo Molnar Cc: stable #3.10+ Signed-off-by: John Stultz --- kernel/time/timekeeping.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 139aaee..b415457 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -1024,6 +1024,8 @@ static int timekeeping_suspend(void) timekeeping_suspend_time = timespec_add(timekeeping_suspend_time, delta_delta); } + + timekeeping_update(tk, TK_MIRROR); write_seqcount_end(&timekeeper_seq); raw_spin_unlock_irqrestore(&timekeeper_lock, flags);