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=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 F2884C2BB85 for ; Sat, 11 Apr 2020 12:14:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CB68720787 for ; Sat, 11 Apr 2020 12:14:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586607297; bh=qEGibT5UAijc/0Xz1y1e509D0RA9GeicJPNQYYQutp4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=x/d3LyUhNMDf8Q3YRxiu99AGnVLlMpMx9VoB+8hWbzhLilfzh4noW8B5qObmpVprY JmlWFS8RFz3o1dtDY6P+MGSFW9fFHGfkkTqb6H65P0cg+mOWh1bxlwHFEL3qxxD2Kc YzV/1LkqdFaEDyCH3UN1Gw4kpP3lKxyOwsVsJRcY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728072AbgDKMOz (ORCPT ); Sat, 11 Apr 2020 08:14:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:48528 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727273AbgDKMOy (ORCPT ); Sat, 11 Apr 2020 08:14:54 -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 329A12084D; Sat, 11 Apr 2020 12:14:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586607293; bh=qEGibT5UAijc/0Xz1y1e509D0RA9GeicJPNQYYQutp4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ykLvzrtDpIquLljUE7u95blBfI1Z6OsU6k2/3aPPIeHiiLmmBICf22R54VbwjP7Sx s35ZTJ8/T4L9YylbV24ew89+mBUcrKCevqtS0SjKAYDO/BaWaMZpuzslnUruFFFw+y jV5io4Cq1EGLvZqXC4GvCOQ1gCAZar9UlohjCyjQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kishon Vijay Abraham I , Lorenzo Pieralisi Subject: [PATCH 4.19 15/54] misc: pci_endpoint_test: Fix to support > 10 pci-endpoint-test devices Date: Sat, 11 Apr 2020 14:08:57 +0200 Message-Id: <20200411115509.847419848@linuxfoundation.org> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200411115508.284500414@linuxfoundation.org> References: <20200411115508.284500414@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Kishon Vijay Abraham I commit 6b443e5c80b67a7b8a85b33d052d655ef9064e90 upstream. Adding more than 10 pci-endpoint-test devices results in "kobject_add_internal failed for pci-endpoint-test.1 with -EEXIST, don't try to register things with the same name in the same directory". This is because commit 2c156ac71c6b ("misc: Add host side PCI driver for PCI test function device") limited the length of the "name" to 20 characters. Change the length of the name to 24 in order to support upto 10000 pci-endpoint-test devices. Fixes: 2c156ac71c6b ("misc: Add host side PCI driver for PCI test function device") Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Lorenzo Pieralisi Cc: stable@vger.kernel.org # v4.14+ Signed-off-by: Greg Kroah-Hartman --- drivers/misc/pci_endpoint_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/misc/pci_endpoint_test.c +++ b/drivers/misc/pci_endpoint_test.c @@ -636,7 +636,7 @@ static int pci_endpoint_test_probe(struc { int err; int id; - char name[20]; + char name[24]; enum pci_barno bar; void __iomem *base; struct device *dev = &pdev->dev;