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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D4AEEE6421 for ; Fri, 15 Sep 2023 06:51:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232413AbjIOGwA (ORCPT ); Fri, 15 Sep 2023 02:52:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232310AbjIOGv6 (ORCPT ); Fri, 15 Sep 2023 02:51:58 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 493812707 for ; Thu, 14 Sep 2023 23:51:54 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83A7FC433C8; Fri, 15 Sep 2023 06:51:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1694760713; bh=PQoeNqV6xHn7JACo5D6UVtHw6kZFO2kntyCiUbxhaDg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DilZRN7JAb8G+9kk1vgiNoy1SKXy1zou8JL3D0lzUIxto+hiFbV7mBJDXwB7CMSk5 8EnNpLMLn16HijWN14skXIETQeK8sXDTJkKZ9vu5Bm2jpWfR8CRnkgxY+bIPCsyfWF pwe6snVlnhkxLJveMlns+EINWhH8cS0EtfgT6Pfk= Date: Fri, 15 Sep 2023 08:51:45 +0200 From: Greg Kroah-Hartman To: "Ricardo B. Marliere" Cc: "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, Shuah Khan , syzbot+bbc59256015533127d80@syzkaller.appspotmail.com Subject: Re: [PATCH] drivers: core: ensure device has a name Message-ID: <2023091533-subdued-antler-d6ac@gregkh> References: <20230915011930.199009-1-ricardo@marliere.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230915011930.199009-1-ricardo@marliere.net> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 14, 2023 at 10:19:31PM -0300, Ricardo B. Marliere wrote: > device_add() relies on dev_name() and dev_set_name() to set the device > name. This patch adds the fallback case where both the call to > dev_name() and (dev->bus && dev->bus->dev_name) fails. > > Reported-by: syzbot+bbc59256015533127d80@syzkaller.appspotmail.com > Closes: https://syzkaller.appspot.com/bug?extid=bbc59256015533127d80 > Fixes: d21fdd07cea4 ("driver core: Return proper error code when dev_set_name() fails") > Signed-off-by: Ricardo B. Marliere > --- > drivers/base/core.c | 2 ++ > 1 file changed, 2 insertions(+) Already submitted and in linux-next: https://lore.kernel.org/r/20230828145824.3895288-1-andriy.shevchenko@linux.intel.com