From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id AC7041A167D for ; Thu, 17 Dec 2015 22:57:36 +1100 (AEDT) In-Reply-To: <562A7255.7010607@linux.vnet.ibm.com> To: Nathan Fontenot , "linuxppc-dev@lists.ozlabs.org" From: Michael Ellerman Subject: Re: powerpc/pseries: Verify CPU doesn't exist before adding Message-Id: <20151217115736.882F7140317@ozlabs.org> Date: Thu, 17 Dec 2015 22:57:36 +1100 (AEDT) List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Fri, 2015-23-10 at 17:45:57 UTC, Nathan Fontenot wrote: > When DLPAR adding a CPU we should verify that the CPU does not already > exist. Failure to do so can generate a kernel oops; > > [ 9.465585] kernel BUG at arch/powerpc/platforms/pseries/dlpar.c:382! > [ 9.465796] Oops: Exception in kernel mode, sig: 5 [#1] > > This oops can be generated by causing a probe to be performed on a cpu > by writing to the sysfs cpu probe file (/sys/devices/system/cpu/probe). > This patch adds a check for the existence of cpu prior to probing the cpu > so userspace doing the wrong thing won't trigger a BUG_ON(). > > Signed-off-by: Nathan Fontenot Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/1f859adb9253c2010799625822 cheers