Message ID | 1392066713-5025-5-git-send-email-john.stultz@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <patchwork-forward+bncBCJ7RPMX4EMBBM4B4WLQKGQESRIQUOI@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f199.google.com (mail-vc0-f199.google.com [209.85.220.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6097C20143 for <linaro@patches.linaro.org>; Mon, 10 Feb 2014 21:12:20 +0000 (UTC) Received: by mail-vc0-f199.google.com with SMTP id hu8sf15645134vcb.10 for <linaro@patches.linaro.org>; Mon, 10 Feb 2014 13:12:19 -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=cjG6vm6zprdvumDp26LoT7WE+hO6cLfX1QzDGw3EJz0=; b=adtQL+T2WvMLC7jpvE1YY61KoISw9PIdtd9pkf57H5cgHXobFJfOFrvY9tAJFNS/yo XVkr0th4+qmCKUR1a8BspNXnDmqR9iqZSvurexTaxbYboT86GSE2R6kDyf0C23aC9znk HzEZB5SoHU2/wbJVz/3ILSZeV+xhStidw5Jz+4sCwNBVwo0KHszWc0giTLZaWnYoOFRU qqfZFErqVCMi6fWSqtFaohLIeIwEam0HAXZiT8IQxCE9VH1mLMAVEby/rkEY8iiAbydW SdWZiki1fI77F9ahyWe/9+h6Ul8d8rwYkVdksH6sZDITMQRrxdSzUjAgwvXZUQAcwNgm TAtg== X-Gm-Message-State: ALoCoQlVOc84F9dnfr6VvHvF4v7oub9/tjvYP3iDKL5I6jv1S1qtCIO+GuAdcMP8TFzDbVawTsEC X-Received: by 10.58.40.97 with SMTP id w1mr10827639vek.13.1392066739451; Mon, 10 Feb 2014 13:12:19 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.80.149 with SMTP id c21ls2245686qgd.52.gmail; Mon, 10 Feb 2014 13:12:19 -0800 (PST) X-Received: by 10.52.107.35 with SMTP id gz3mr21311444vdb.8.1392066739237; Mon, 10 Feb 2014 13:12:19 -0800 (PST) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by mx.google.com with ESMTPS id eo4si5145504vdb.69.2014.02.10.13.12.19 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Feb 2014 13:12:19 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.172 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.172; Received: by mail-ve0-f172.google.com with SMTP id c14so5518972vea.3 for <patchwork-forward@linaro.org>; Mon, 10 Feb 2014 13:12:19 -0800 (PST) X-Received: by 10.220.103.141 with SMTP id k13mr2876621vco.25.1392066739164; Mon, 10 Feb 2014 13:12:19 -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 u4csp198059vcz; Mon, 10 Feb 2014 13:12:18 -0800 (PST) X-Received: by 10.68.135.137 with SMTP id ps9mr6105809pbb.160.1392066724599; Mon, 10 Feb 2014 13:12:04 -0800 (PST) Received: from mail-pd0-f170.google.com (mail-pd0-f170.google.com [209.85.192.170]) by mx.google.com with ESMTPS id i8si16655561pav.45.2014.02.10.13.12.04 for <patches@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Feb 2014 13:12:04 -0800 (PST) Received-SPF: neutral (google.com: 209.85.192.170 is neither permitted nor denied by best guess record for domain of john.stultz@linaro.org) client-ip=209.85.192.170; Received: by mail-pd0-f170.google.com with SMTP id p10so6610050pdj.15 for <patches@linaro.org>; Mon, 10 Feb 2014 13:12:04 -0800 (PST) X-Received: by 10.66.187.11 with SMTP id fo11mr28157539pac.47.1392066724229; Mon, 10 Feb 2014 13:12:04 -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 qh2sm119192622pab.13.2014.02.10.13.12.02 for <multiple recipients> (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Feb 2014 13:12:02 -0800 (PST) From: John Stultz <john.stultz@linaro.org> To: stable <stable@vger.kernel.org> Cc: John Stultz <john.stultz@linaro.org>, Sasha Levin <sasha.levin@oracle.com>, Thomas Gleixner <tglx@linutronix.de>, Prarit Bhargava <prarit@redhat.com>, Richard Cochran <richardcochran@gmail.com>, Ingo Molnar <mingo@kernel.org> Subject: [PATCH 4/5] 3.10.y: timekeeping: Fix missing timekeeping_update in suspend path Date: Mon, 10 Feb 2014 13:11:52 -0800 Message-Id: <1392066713-5025-5-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1392066713-5025-1-git-send-email-john.stultz@linaro.org> References: <1392066713-5025-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.128.172 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: <patchwork-forward.linaro.org> X-Google-Group-Id: 836684582541 List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> List-Unsubscribe: <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe>, <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com> |
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index 40f75a0..d81b111 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c @@ -1008,6 +1008,8 @@ static int timekeeping_suspend(void) timekeeping_suspend_time = timespec_add(timekeeping_suspend_time, delta_delta); } + + timekeeping_update(tk, false, true); write_seqcount_end(&timekeeper_seq); raw_spin_unlock_irqrestore(&timekeeper_lock, flags);
This is a 3.10-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 <sasha.levin@oracle.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Prarit Bhargava <prarit@redhat.com> Cc: Richard Cochran <richardcochran@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: stable <stable@vger.kernel.org> #3.10+ Signed-off-by: John Stultz <john.stultz@linaro.org> --- kernel/time/timekeeping.c | 2 ++ 1 file changed, 2 insertions(+)