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=-13.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 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 CBCDBC433DF for ; Wed, 14 Oct 2020 16:19:51 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 57702214D8 for ; Wed, 14 Oct 2020 16:19:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="jhBVFuxS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 57702214D8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=UhbMUlxryCoeE/Q7oGlca6V6jKlCDpzm+DoF+FCtLuk=; b=jhBVFuxSmIzthpU+N8YhGEXgK aEjp71CaJnd/6NNQZSR4xXP//zithxcy/M4TZFuQIdVoTDUMVxuY6GNXK1z0YKjCREzTtqlxx2hQt p1LmQFa/75IIf44xnnjOmTb4DOUrTDz3k+x5hWGjTMwumfeB6Yh8ZfiTqLOQixC135vykyfLIZyNG SHp4hiGs3io7qyA33FGZZw7cniKzeRMGhG/7rIlIxHFsssKjJ2xrTG0EHHRFALtKFwRjvcP0eAMe8 Vo/Sjw3D3+ItvoUI5HzKrGw/1mtnzMmMPn4T2BoU9PcQJK+MZfsNAHc7SYutA507vCUkUkh7HiN6F XyGqEwcOA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSjU8-0006ER-5p; Wed, 14 Oct 2020 16:18:40 +0000 Received: from foss.arm.com ([217.140.110.172]) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSjU6-0006DY-0D for linux-arm-kernel@lists.infradead.org; Wed, 14 Oct 2020 16:18:38 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4A541D6E; Wed, 14 Oct 2020 09:18:36 -0700 (PDT) Received: from bogus (unknown [10.57.12.254]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EC1AD3F71F; Wed, 14 Oct 2020 09:18:34 -0700 (PDT) Date: Wed, 14 Oct 2020 17:18:29 +0100 From: Sudeep Holla To: Cristian Marussi Subject: Re: [PATCH] firmware: arm_scmi: Fix duplicate workqueue name Message-ID: <20201014160120.4x2l7hozf376gk3l@bogus> References: <20201014021737.287340-1-f.fainelli@gmail.com> <20201014091806.GB20315@bogus> <20201014130524.cj42wknvzdpgsbsr@bogus> <20201014134819.GA24061@e120937-lin> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201014134819.GA24061@e120937-lin> User-Agent: NeoMutt/20171215 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201014_121838_084934_06FC7490 X-CRM114-Status: GOOD ( 19.79 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Florian Fainelli , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jonathan Cameron Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Oct 14, 2020 at 02:48:19PM +0100, Cristian Marussi wrote: [...] > > > > I have pushed a version with above change [1], please check if you are > > happy with that ? > > > > [1] https://git.kernel.org/sudeep.holla/linux/c/b2cd15549b > > I agree with the need to retain _notify name, but I'm not so sure about > the above patch...which is: > I agree, I thought about it and just cooked up this as a quick solution. I will move to that, even I wasn't happy with this TBH. > diff --git a/drivers/firmware/arm_scmi/notify.c b/drivers/firmware/arm_scmi/notify.c > index c24e427dce0d7..f60fa630dd98f 100644 > --- a/drivers/firmware/arm_scmi/notify.c > +++ b/drivers/firmware/arm_scmi/notify.c > @@ -1461,6 +1461,7 @@ static const struct scmi_notify_ops notify_ops = { > int scmi_notification_init(struct scmi_handle *handle) > { > void *gid; > + char scmi_wq_name[32]; > struct scmi_notify_instance *ni; > > gid = devres_open_group(handle->dev, NULL, GFP_KERNEL); > @@ -1474,7 +1475,8 @@ int scmi_notification_init(struct scmi_handle *handle) > ni->gid = gid; > ni->handle = handle; > > - ni->notify_wq = alloc_workqueue("scmi_notify", > + sprintf(scmi_wq_name, "%s_notify", dev_name(handle->dev)); > + ni->notify_wq = alloc_workqueue(scmi_wq_name, > WQ_UNBOUND | WQ_FREEZABLE | WQ_SYSFS, > 0); > if (!ni->notify_wq) > > ...does not expose a potential buffer overflow given that the dev_name now comes > from the DT chosen name for this SCMI server instance ? > > I'd use snprintf and enlarge a bit the static scmi_wq_name[] to fit a max > device bane plus "_notify". > > Regards > Cristian -- Regards, Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel