Message ID | 1390440899-10273-6-git-send-email-john.stultz@linaro.org |
---|---|
State | Superseded |
Headers | show
Return-Path: <patchwork-forward+bncBCJ7RPMX4EMBBV7DQGLQKGQE5GQIHHY@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f69.google.com (mail-pb0-f69.google.com [209.85.160.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7010A203C6 for <linaro@patches.linaro.org>; Thu, 23 Jan 2014 01:35:20 +0000 (UTC) Received: by mail-pb0-f69.google.com with SMTP id md12sf2703150pbc.4 for <linaro@patches.linaro.org>; Wed, 22 Jan 2014 17:35: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=zMIQ9KalLLA7UU3lW1EsKH4qIZEbF9M5joNqE3LRS0g=; b=JkhsH138QUSc3N9JCxHDmy9xv52xqWB4SzQY+rQaiEusWGBTmvAIuoS+4PLrI/dhUt 6HE+KhO1/lJX77lUdSGXdnh2VPmDJALWRefP63iepYb7aSSnts5lxGdjM65HiAmgfgJ/ hHNZc37ycPSd6qoGZgTJRhnyeUk2zJDYJMTi3wRB8jjUuToXgf2SCJk8CEDOzdkbMf4R yNykLT8N4IT4JIWCfkRv4DvbgF0SVVlqLVPvhXG+VF2uQQzSXeEehVnNMLhLlajRaYqr d+AeVuY/962pEbAOhzc5HDibK74eFa/a2XjsdvvGO/3yGaJoXqltRpiUujqFO+uUWHUN uEsg== X-Gm-Message-State: ALoCoQkQ0WS9Dqea5N0nLYosM3N9VQogoME69ovoaBDmC3Lfj9yb6dgf4/eKXq91H/8pizcr7J8G X-Received: by 10.66.240.4 with SMTP id vw4mr1900695pac.10.1390440919718; Wed, 22 Jan 2014 17:35:19 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.90.80 with SMTP id w74ls175828qgd.95.gmail; Wed, 22 Jan 2014 17:35:19 -0800 (PST) X-Received: by 10.58.235.129 with SMTP id um1mr3053792vec.17.1390440919596; Wed, 22 Jan 2014 17:35:19 -0800 (PST) Received: from mail-ve0-f180.google.com (mail-ve0-f180.google.com [209.85.128.180]) by mx.google.com with ESMTPS id xe7si5685554vec.2.2014.01.22.17.35.19 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 Jan 2014 17:35:19 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.180 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.180; Received: by mail-ve0-f180.google.com with SMTP id db12so726402veb.39 for <patchwork-forward@linaro.org>; Wed, 22 Jan 2014 17:35:19 -0800 (PST) X-Received: by 10.58.91.198 with SMTP id cg6mr48850veb.52.1390440919513; Wed, 22 Jan 2014 17:35: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 u4csp224919vcz; Wed, 22 Jan 2014 17:35:18 -0800 (PST) X-Received: by 10.68.234.230 with SMTP id uh6mr114228pbc.161.1390440918446; Wed, 22 Jan 2014 17:35:18 -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 pi8si11919088pac.117.2014.01.22.17.35.18 for <patches@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 Jan 2014 17:35:18 -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 p10so1123157pdj.15 for <patches@linaro.org>; Wed, 22 Jan 2014 17:35:18 -0800 (PST) X-Received: by 10.66.16.131 with SMTP id g3mr4986668pad.138.1390440917978; Wed, 22 Jan 2014 17:35:17 -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 j3sm29268483pbh.38.2014.01.22.17.35.16 for <multiple recipients> (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 22 Jan 2014 17:35:17 -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 5/6] 3.13.y: timekeeping: Fix missing timekeeping_update in suspend path Date: Wed, 22 Jan 2014 17:34:58 -0800 Message-Id: <1390440899-10273-6-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1390440899-10273-1-git-send-email-john.stultz@linaro.org> References: <1390440899-10273-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.180 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 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);
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 <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(+)