Received: by 2002:a25:d80d:0:0:0:0:0 with SMTP id p13csp48418ybg; Sat, 23 May 2020 07:08:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVoNK0+9aczM6fNHlgXHd82kiHCoKal2lk5AdQ+W8NJf+qBaSF2gB7LXvmw+YluAth162n X-Received: by 2002:a17:906:9384:: with SMTP id l4mr11931423ejx.168.1590242928014; Sat, 23 May 2020 07:08:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590242928; cv=none; d=google.com; s=arc-20160816; b=DVtA2IEToSerKWOrJIeCLndDMlGtXhe5fPwaHE5bOKxwTisU9c7fiqo4UoMta7Mq5z R3iAaHCp3/BZLZhaBA5X2h/wrzl7ldAM8r6CpYCUrjXx4ZI+NmD98heB5ipIoSwPf2nW Z8GwYs3Hh3WKMJAVnqAzbKFU6pWx9YQrq9ta41I2aSiJMiFcV6ZHjpNTzRfft2nPw0HE aktT2ENDpmhOUXi/jwr/CT7v/4HBxqlqFDwJOhHaXF3BGYmxPidk+CB1DDVMk1WxGJP0 YOqDqrFbK70sDDDFjstavA5qgMzb8ySY3KYccfCQcLKFuYlYJpeQJ7KtXgl5Iy6mmLdw V/Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=5it6n0JCWNLDu11rhoKLzZzITTV3peDtUMRtV/ZySzM=; b=VfnOJuvOqD2r8DfzomdhE6Vu95Yad/3iWU5YqRsRcEWkawNqSyPq/bbCAcATDg813a Z42cZSOqN22kvo2OMh4o9E3+z9aHa/2ELx3ymySX1ywYEVdvuZYoJI9mIlDv3XhwG6mB s1DFp/Da9qvSIiVnLNbXZpd7CkJCA3/1dNBz74aAKHbBAIUNf0HUPmolzBD8suCy8ljD VgIX69Rd8ne3T8QqaJaNhHmuHyOMYA+ZP3q3uGLHfe9SJsyP3nCkfaK3Z3ZJzcgjGPl0 V2yC9/zC+Yy5FV29ejJNtyYosugHAbrkCHTKE1acatekecH+gi5zjQ7wFlvWi9oaYC/6 LgGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YVZj5q+F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i10si4387513ejx.250.2020.05.23.07.08.23; Sat, 23 May 2020 07:08:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YVZj5q+F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387849AbgEWOEP (ORCPT + 99 others); Sat, 23 May 2020 10:04:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:36424 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387529AbgEWOEO (ORCPT ); Sat, 23 May 2020 10:04:14 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 75BB62072C; Sat, 23 May 2020 14:04:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590242653; bh=3GrDS2+LfV+5Q1mKglHDFkYxRwI4AAtXMEEXKunzq3s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=YVZj5q+FKln2NEIeK0OZ41mzcqT7ILj9jfKpLGM4QNnhZoYBpGvPFOkPtDHvIMfGQ Jxv1rT7u92dlCkjmMv86YzODMCHGzSWqCPTV3Wc8x+ffZCX15ylxAINbASOUIPAhFA cpW/4oHZO4BEgq0cwgIOYKO5g9fRI6IH4NJKep9M= Date: Sat, 23 May 2020 16:04:11 +0200 From: Greg Kroah-Hartman To: Guenter Roeck Cc: Heikki Krogerus , linux-kernel@vger.kernel.org, Naresh Kamboju , kernel test robot , Brendan Higgins , Randy Dunlap , "Rafael J. Wysocki" Subject: Re: [PATCH] kobject: Make sure the parent does not get released before its children Message-ID: <20200523140411.GA114366@kroah.com> References: <20200513151840.36400-1-heikki.krogerus@linux.intel.com> <20200523132101.GA76443@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200523132101.GA76443@roeck-us.net> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 23, 2020 at 06:21:01AM -0700, Guenter Roeck wrote: > On Wed, May 13, 2020 at 06:18:40PM +0300, Heikki Krogerus wrote: > > In the function kobject_cleanup(), kobject_del(kobj) is > > called before the kobj->release(). That makes it possible to > > release the parent of the kobject before the kobject itself. > > > > To fix that, adding function __kboject_del() that does > > s/kboject/kobject/ > > > everything that kobject_del() does except release the parent > > reference. kobject_cleanup() then calls __kobject_del() > > instead of kobject_del(), and separately decrements the > > reference count of the parent kobject after kobj->release() > > has been called. > > > > Reported-by: Naresh Kamboju > > Reported-by: kernel test robot > > Fixes: 7589238a8cf3 ("Revert "software node: Simplify software_node_release() function"") > > Cc: Brendan Higgins > > Cc: Randy Dunlap > > Suggested-by: "Rafael J. Wysocki" > > Signed-off-by: Heikki Krogerus > > Reviewed-by: Rafael J. Wysocki > > Reviewed-by: Brendan Higgins > > Tested-by: Brendan Higgins > > Acked-by: Randy Dunlap > > Tested-by: Randy Dunlap > > All my arm64be (arm64 big endian) boot tests crash with this patch > applied. Reverting it fixes the problem. Crash log and bisect results > (from pending-fixes branch) below. Ugh, ok, just when I send Linus a pull request. Let me go fix that... greg k-h