From patchwork Mon Feb 10 21:11:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 24426 Return-Path: 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 ; Mon, 10 Feb 2014 21:12:20 +0000 (UTC) Received: by mail-vc0-f199.google.com with SMTP id hu8sf15645134vcb.10 for ; 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 (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 ; 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 (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 ; 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 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Feb 2014 13:12:02 -0800 (PST) From: John Stultz To: stable Cc: John Stultz , Sasha Levin , Thomas Gleixner , Prarit Bhargava , Richard Cochran , Ingo Molnar 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: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 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 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);