From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7BD3C2D0E6 for ; Wed, 25 Mar 2020 17:53:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9A1AE206F6 for ; Wed, 25 Mar 2020 17:53:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585158836; bh=NJuwP2YbsONxaJdDz9rDzkUuT7RhiG17N8zx3Y1Xs6A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=MwjFs20fDmoT5QIt53Prt3Xd+ZSmQiznewSzS+h2D76wkfo329au8k02+CF3imoKc sWxn3bxBeAP0AQMjyEO8OOCV9FhCgVUNfAelIRuEMuEQqBM5ao6joA6bk2xR0HKlsq e0wJ0jdelU+48YLXXKbGIZt2HcQQbEULcYaR+KHo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727600AbgCYRxz (ORCPT ); Wed, 25 Mar 2020 13:53:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:37318 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727129AbgCYRxz (ORCPT ); Wed, 25 Mar 2020 13:53:55 -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 1ED87206F6; Wed, 25 Mar 2020 17:53:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585158833; bh=NJuwP2YbsONxaJdDz9rDzkUuT7RhiG17N8zx3Y1Xs6A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MxDBuS3QGiZJmxkEmlssCP2XTQbDDIMzUbmITX+jPJrGnJ3eJJGsoXuXinhIlJgZF YFpX3DPJdyoxV/W4bU5s1986mMrsZ4sZPMOhP7P84l84bcK7VA7Y6BOiProeVbqMd9 x/9vr0N6BmDQe8Km6V19S5uD+IvsbH6xi6IahCQQ= Date: Wed, 25 Mar 2020 18:53:51 +0100 From: Greg Kroah-Hartman To: Jiri Slaby Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Saravana Kannan , Takashi Iwai Subject: Re: [PATCH 5.5 066/189] driver core: Call sync_state() even if supplier has no consumers Message-ID: <20200325175351.GA3765240@kroah.com> References: <20200310123639.608886314@linuxfoundation.org> <20200310123646.283600281@linuxfoundation.org> <93643339-612c-3438-fff8-4eac728118a0@suse.cz> <20200325140708.GA3533248@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200325140708.GA3533248@kroah.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 25, 2020 at 03:07:08PM +0100, Greg Kroah-Hartman wrote: > On Wed, Mar 25, 2020 at 02:42:27PM +0100, Jiri Slaby wrote: > > On 10. 03. 20, 13:38, Greg Kroah-Hartman wrote: > > > From: Saravana Kannan > > > > > > commit 21eb93f432b1a785df193df1a56a59e9eb3a985f upstream. > > > > > > The initial patch that added sync_state() support didn't handle the case > > > where a supplier has no consumers. This was because when a device is > > > successfully bound with a driver, only its suppliers were checked to see > > > if they are eligible to get a sync_state(). This is not sufficient for > > > devices that have no consumers but still need to do device state clean > > > up. So fix this. > > > > > > Fixes: fc5a251d0fd7ca90 (driver core: Add sync_state driver/bus callback) > > > > This causes NULL ptr dereferences (in 5.5 only). It is enough to load > > the mac80211_hwsim module. > > > > The backport to 5.5 needs at least these two commits: > > commit ac338acf514e7b578fa9e3742ec2c292323b4c1a > > Author: Saravana Kannan > > Date: Fri Feb 21 00:05:09 2020 -0800 > > > > driver core: Add dev_has_sync_state() > > > > commit 77036165d8bcf7c7b2a2df28a601ec2c52bb172d > > Author: Saravana Kannan > > Date: Fri Feb 21 00:05:10 2020 -0800 > > > > driver core: Skip unnecessary work when device doesn't have sync_state() > > > > > > and playing with includes. > > > > I am not sure if a revert wouldn't be better -- leaving up to maintainers. > > > > https://bugzilla.suse.com/show_bug.cgi?id=1167245 > > These are already queued up, I think I'll push out an update in a bit > with them in a release... Should all now be fixed in 5.5.13. If not, please let me know. thanks, greg k-h