Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp735319ybs; Sun, 24 May 2020 20:08:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzD33OCQU7A1KgpOLKf3OSsUGRLzPQyuXHGTn1PQsSdjsU12qQ50B/0aiF8TJYFvyw8g0kY X-Received: by 2002:a50:e607:: with SMTP id y7mr13775250edm.71.1590376086068; Sun, 24 May 2020 20:08:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590376086; cv=none; d=google.com; s=arc-20160816; b=eeVMk+E+NlN1KJoXvDDXd9bxn65eOFQDxuoY4tlW7L2nALZAxMCRaU9RoporuYmj7y fwr0hVNx8XU7Ws807sOsZtrV/sjZ27EB51Zl37jVD8uaM7SwYCW9mW/z1tAhoKSHPP5K /GEzDrFyULdEAxZ4nRDCRPgEXikwuD1QeMWBoAe5WtMUEmaegMSVGDcuz1p9/XdCOPfh KWEOQ+lXVdmbRKH8l0QwLZ/PxPe32u3lM7mE1wwMwr+wtih/ennxXDyugkuILwWckc+C aIm/nX64dqOvAvt5kFFl23yIJoqy75RKWuL3PsWFl47LmEdBbZve4XYO1eRwM0uDqrdW pdzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=ANukTnGf9qzAoLJoJyRWxzKKdZWe8nKT7t7/i4XYDHs=; b=OrVfesAnLgx1lWpaz5YeykkQa9dxwX+KEg8jBDbH0QXzYNVwKT9FW9SXCUTQ6bxBm9 6nU+qfmISoVF8nzrTBc7cYLHH0jbFI6KHx6BajI8JN+7m9BrkHDSDOiXLUhoENp+7412 Gsqt1LKMt9Ak88JAytDd+N7ceZnUAuLrUU0g9Q3KNl/NrvWqwhiM8ga67nEFtokW+5wT sVLKfVsAxPYBQkflYu804ct6+ykTOdm4mDPC6Jh41kYyzXBjtIIZ9PLXw3LhJYCytJ0S bZoySfQHNiDd8T5ecfajdYqpmsKy3L2JHEu7BKkKWb93M9DFrvKunkBxW9Vmn6PMpGTQ cRHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Y5HnZg8Q; 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 dn17si11901631ejc.125.2020.05.24.20.07.43; Sun, 24 May 2020 20:08:06 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Y5HnZg8Q; 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 S2388575AbgEYCoi (ORCPT + 99 others); Sun, 24 May 2020 22:44:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388409AbgEYCoi (ORCPT ); Sun, 24 May 2020 22:44:38 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F0F4C061A0E; Sun, 24 May 2020 19:44:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Sender:Reply-To:Content-ID:Content-Description; bh=ANukTnGf9qzAoLJoJyRWxzKKdZWe8nKT7t7/i4XYDHs=; b=Y5HnZg8QP8DTAs73j/nJCk8wlu wiu8LaYgIfJac8zqjI0xHJgeZ/i7B4788vRf3XmhSqsa0TwgkMagM3TRUM7Kwz24yQV7uq/6wAL8f pLZBKbXyaQnAtG8pCoqqMzG1eY8XAZLRRJ/ji6P4yr6LyhvlixgM0HDHZuxgPWdosFQG6L46ejkUX RD4S3qgop3rBJVuOMvKLpkqE0yKwqiuGpGADLidqUHHqTcwRtOz9/rl2E2aH5mLNe5VvdTOsw7ikC bmI6Fviwh+poEMANipihvbvVk5raZNASVV0nXwzHOIanyVOW8HLt1i6mkrW8+RMV14jT+0vWV+7Am HCbGhKUQ==; Received: from [2601:1c0:6280:3f0::19c2] by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jd36A-00004r-Bc; Mon, 25 May 2020 02:44:19 +0000 Subject: Re: [PATCH 1/2] software node: implement software_node_unregister() To: Guenter Roeck , Greg Kroah-Hartman , linux-kernel@vger.kernel.org Cc: Naresh Kamboju , kernel test robot , stable , Andy Shevchenko , Brendan Higgins , Dmitry Torokhov , Heikki Krogerus , Petr Mladek , "Rafael J . Wysocki" , Rasmus Villemoes , Sakari Ailus , Sergey Senozhatsky , Steven Rostedt References: <20200524153041.2361-1-gregkh@linuxfoundation.org> <605c47b7-9199-85f1-89e0-bd768acd3d2d@roeck-us.net> From: Randy Dunlap Message-ID: <13de8a28-9ea9-bf44-c4e7-d5bfb63c81fd@infradead.org> Date: Sun, 24 May 2020 19:44:16 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <605c47b7-9199-85f1-89e0-bd768acd3d2d@roeck-us.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/24/20 9:43 AM, Guenter Roeck wrote: > On 5/24/20 8:30 AM, Greg Kroah-Hartman wrote: >> Sometimes it is better to unregister individual nodes instead of trying >> to do them all at once with software_node_unregister_nodes(), so create >> software_node_unregister() so that you can unregister them one at a >> time. >> >> This is especially important when creating nodes in a hierarchy, with >> parent -> children representations. Children always need to be removed >> before a parent is, as the swnode logic assumes this is going to be the >> case. >> >> Fix up the lib/test_printf.c fwnode_pointer() test which to use this new >> function as it had the problem of tearing things down in the backwards >> order. >> >> Fixes: f1ce39df508d ("lib/test_printf: Add tests for %pfw printk modifier") >> Reported-by: Naresh Kamboju >> Reported-by: kernel test robot >> Cc: stable >> Cc: Andy Shevchenko >> Cc: Brendan Higgins >> Cc: Dmitry Torokhov >> Cc: Heikki Krogerus >> Cc: Petr Mladek >> Cc: Rafael J. Wysocki >> Cc: Randy Dunlap >> Cc: Rasmus Villemoes >> Cc: Sakari Ailus >> Cc: Sergey Senozhatsky >> Cc: Steven Rostedt >> Signed-off-by: Greg Kroah-Hartman > > Both patches pass my boot tests on arm64 and arm64be (I didn't test any others). > So, FWIW, > > Tested-by: Guenter Roeck > > I wasn't sure it the two patches replace or fix commit 4ef12f719802 ("kobject: > Make sure the parent does not get released before its children"), so I tried > to re-apply 4ef12f719802 on top of the two patches. Unfortunately that still > results in crashes and UAF messages. Yes, that kobject patch has been reverted: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e6764aa0e5530066dd969eccea2a1a7d177859a8 and these 2 patches are to be used instead. thanks. -- ~Randy