From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932345AbbFWKCc (ORCPT ); Tue, 23 Jun 2015 06:02:32 -0400 Received: from citadel.icyb.net.ua ([212.40.38.140]:4846 "EHLO citadel.icyb.net.ua" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752527AbbFWKCY (ORCPT ); Tue, 23 Jun 2015 06:02:24 -0400 X-Greylist: delayed 318 seconds by postgrey-1.27 at vger.kernel.org; Tue, 23 Jun 2015 06:02:24 EDT Message-ID: <55892D34.7060504@FreeBSD.org> Date: Tue, 23 Jun 2015 12:56:04 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: "linux-kernel@vger.kernel.org" Subject: clockevents_shutdown vs pending interrupt Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Pardon if I am asking something obvious or silly... tick_check_new_device() has the following code: if (tick_is_broadcast_device(curdev)) { clockevents_shutdown(curdev); curdev = NULL; } and void clockevents_shutdown(struct clock_event_device *dev) { clockevents_set_mode(dev, CLOCK_EVT_MODE_SHUTDOWN); dev->next_event.tv64 = KTIME_MAX; } This is all done while interrupts are disabled on the current CPU. But what if there is already a pending interrupt from the current source? Is it possible that the timer interrupt would be processed by the device that was put in the shutdown mode? Some context: I am experiencing exactly the same symptoms as described here http://thread.gmane.org/gmane.linux.kernel/1483297. But I run a kernel where that bug is fixed. And my problem happens in a VM, so it's possible that there are timing issues which are very unlikely on real hardware. -- Andriy Gapon