Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935384AbdCWPYE (ORCPT ); Thu, 23 Mar 2017 11:24:04 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:52142 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932449AbdCWPYB (ORCPT ); Thu, 23 Mar 2017 11:24:01 -0400 From: Vaidyanathan Srinivasan To: Michael Neuling , Michael Ellerman , "Rafael J . Wysocki" , Daniel Lezcano Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH v1 0/2] cpuidle: Fixes in cpuidle driver Date: Thu, 23 Mar 2017 20:52:45 +0530 X-Mailer: git-send-email 2.9.3 X-TM-AS-MML: disable x-cbid: 17032315-0040-0000-0000-00000300AAC7 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17032315-0041-0000-0000-00000C777BFC Message-Id: <20170323152247.14733-1-svaidy@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-03-23_13:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1703230137 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 596 Lines: 14 When CONFIG_HOTPLUG_CPU=n and cpu_present is less than cpu_possible, then cpuidle-powernv not passing an explicit drv->cpu_mask allows generic cpuidle driver to try create sysfs objects for cpus that does not have cpu_devices created by calling register_cpu(). This caused kernel to access incorrect address and crash. The following patch series fixes the cpuidle-powernv driver and also adds additional checks in cpuidle_add_sysfs() This patch set is against v4.11-rc3. Changed from v1: Updated commit message and comments. Signed-off-by: Vaidyanathan Srinivasan