From patchwork Thu May 29 13:48:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 31129 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f200.google.com (mail-ob0-f200.google.com [209.85.214.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 481D7203E6 for ; Thu, 29 May 2014 14:10:11 +0000 (UTC) Received: by mail-ob0-f200.google.com with SMTP id wo20sf1689827obc.11 for ; Thu, 29 May 2014 07:10:10 -0700 (PDT) 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:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=EgZMzKAS67TiA+I87clFSUe0KS/OOwt1LPuCsyrHAEA=; b=MX4RPbYlGmhBhM5O5kH5d88cEmtE9q7yitqT5xQeQDEmOICPaOtquXuY1CBMhe9Rrs EKkGOaxL0Q9AfeWVZ1cMh3q/zhFKiE1WhR5jcsozGN7VrfTk1WDXDG4HiExNCg3GCiaA rdDiVdDTzNzhpSTd4Qbpb5UY1CyU9/6P9hC2PWvrL6cjV5CT6wCpgSsGtzNxuC1k3E9Y wMYM+wCYPQkTBa/j/2RnyqX3vg2eTBSGSOWFP1QLcOizcISOAsh2JgzSaiRIiRa78BLC kkBj2N0Y79sfTPbikeysrGtoR0/FOHPv1yrbq29QMbamQqWIx+5GBpwNuJF4w9jt8Vgw HUDQ== X-Gm-Message-State: ALoCoQnRRNCQMpYG+xPaHsihoMqoZPSLdpwUSbAPgmMP50/ljfB/SD2xeTXBZb3yNTBRmKABBqVb X-Received: by 10.42.185.1 with SMTP id cm1mr2852098icb.10.1401372610659; Thu, 29 May 2014 07:10:10 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.34.196 with SMTP id l62ls266892qgl.35.gmail; Thu, 29 May 2014 07:10:10 -0700 (PDT) X-Received: by 10.52.147.200 with SMTP id tm8mr1729191vdb.54.1401372610428; Thu, 29 May 2014 07:10:10 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id v18si560810vcu.0.2014.05.29.07.10.10 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 29 May 2014 07:10:10 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.175 as permitted sender) client-ip=209.85.220.175; Received: by mail-vc0-f175.google.com with SMTP id id10so427493vcb.20 for ; Thu, 29 May 2014 07:10:10 -0700 (PDT) X-Received: by 10.52.25.130 with SMTP id c2mr932222vdg.27.1401372610338; Thu, 29 May 2014 07:10:10 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp31491vcb; Thu, 29 May 2014 07:10:09 -0700 (PDT) X-Received: by 10.68.224.101 with SMTP id rb5mr9010283pbc.135.1401372609481; Thu, 29 May 2014 07:10:09 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gm1si1033836pbd.252.2014.05.29.07.10.08; Thu, 29 May 2014 07:10:08 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757775AbaE2OKA (ORCPT + 27 others); Thu, 29 May 2014 10:10:00 -0400 Received: from ip4-83-240-18-248.cust.nbox.cz ([83.240.18.248]:59412 "EHLO ip4-83-240-18-248.cust.nbox.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933298AbaE2Ntc (ORCPT ); Thu, 29 May 2014 09:49:32 -0400 Received: from ku by ip4-83-240-18-248.cust.nbox.cz with local (Exim 4.80.1) (envelope-from ) id 1Wq0i0-0008PW-KD; Thu, 29 May 2014 15:49:28 +0200 From: Jiri Slaby To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Viresh Kumar , linaro-kernel@lists.linaro.org, fweisbec@gmail.com, Arvind.Chauhan@arm.com, linaro-networking@linaro.org, Thomas Gleixner , Jiri Slaby Subject: [PATCH 3.12 027/103] tick-common: Fix wrong check in tick_check_replacement() Date: Thu, 29 May 2014 15:48:12 +0200 Message-Id: <39760567d0146b23580d41db26b60cd9f873a4df.1401371259.git.jslaby@suse.cz> X-Mailer: git-send-email 1.9.3 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linux-kernel-owner@vger.kernel.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Viresh Kumar 3.12-stable review patch. If anyone has any objections, please let me know. =============== commit 521c42990e9d561ed5ed9f501f07639d0512b3c9 upstream. tick_check_replacement() returns if a replacement of clock_event_device is possible or not. It does this as the first check: if (tick_check_percpu(curdev, newdev, smp_processor_id())) return false; Thats wrong. tick_check_percpu() returns true when the device is useable. Check for false instead. [ tglx: Massaged changelog ] Signed-off-by: Viresh Kumar Cc: linaro-kernel@lists.linaro.org Cc: fweisbec@gmail.com Cc: Arvind.Chauhan@arm.com Cc: linaro-networking@linaro.org Link: http://lkml.kernel.org/r/486a02efe0246635aaba786e24b42d316438bf3b.1397537987.git.viresh.kumar@linaro.org Signed-off-by: Thomas Gleixner Signed-off-by: Jiri Slaby --- kernel/time/tick-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c index 64522ecdfe0e..271ce26faa21 100644 --- a/kernel/time/tick-common.c +++ b/kernel/time/tick-common.c @@ -260,7 +260,7 @@ static bool tick_check_preferred(struct clock_event_device *curdev, bool tick_check_replacement(struct clock_event_device *curdev, struct clock_event_device *newdev) { - if (tick_check_percpu(curdev, newdev, smp_processor_id())) + if (!tick_check_percpu(curdev, newdev, smp_processor_id())) return false; return tick_check_preferred(curdev, newdev);