Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3350567pxj; Mon, 14 Jun 2021 21:59:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzggl1e9OJb1S+2jpsdwt+stjRtMzzwevE6VHOe13KDS/VfcuP2+LxsphW5Lbwl7Lnplqqn X-Received: by 2002:a17:907:2165:: with SMTP id rl5mr18496186ejb.98.1623733162526; Mon, 14 Jun 2021 21:59:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623733162; cv=none; d=google.com; s=arc-20160816; b=kmQ1ZVSJbHxgmnXqz/76cwFjF9TJ0fqIF6SXrV3V6/+wg8lLJD9XP0iZnQ+F4Eeik1 T2P+CVx740UJ/goKQjB+OWif6olTJO3pp1cn72kKL2KreLgXPg6rAgmHBkn7EFMQ0deu h6p5ca5ZUxJ8uZTTe4IOK2dcogu+3egVXBfLIUIwtYiHZ+8j2jW9U003+dpimmm2j4ts n5XL7y6XxShxGP4F94oI62qg6+LV6uo603KJ+QsX/WUbKFYMeJhVsLQqXaUkeJEd7JJs xJ2ZIqSvuSdWafs7raKfAXLPG+aVxMFFDut7vS7AdoSaV09Kd/9meUeB2dFC9STiMJCU pDbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=A2Z9627pep118KuUsbfkzW2t5KkKkrBpYVYF4dyu4/k=; b=swvIbCWQkEQPQ1V22s5DAO83aPeJ4xwd1O/wBUIIvTOvQ4gaeL/nj1Nhgxu9NY+Qvc E5aMjfIdRS/iLL4oU/1o4MKEfNvLUxEqO8Fka+sCJEI7c+ZmasaJVZqFDbt2DWD8wK35 sJVLAia7/k7yJT35IAmoaliLk7IvPebQFVSwVPwGrzf8odKBbTFd/XUNB9W7DwHDZga6 6xdlEQugHUcTMQYanaRBcNFThzYd1oN8zTtrLVyKWDNtdVcTxNtxBEeNmg/bomknYSy6 57e5IB/dtmYWaLMva/lhBEbOo30LfmZugpQX6L2XxYUSUD6RliCCpLYUJYOk4tWpvgca OAMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mLnV0J1J; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h8si6289253ejo.269.2021.06.14.21.58.59; Mon, 14 Jun 2021 21:59:22 -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=pass header.i=@linuxfoundation.org header.s=korg header.b=mLnV0J1J; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229992AbhFOE6W (ORCPT + 99 others); Tue, 15 Jun 2021 00:58:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:48348 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229463AbhFOE6V (ORCPT ); Tue, 15 Jun 2021 00:58:21 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 188AC613DA; Tue, 15 Jun 2021 04:56:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623732977; bh=NRGdtYDLvpCd+/uSyt1rDy8DtVDlYObyw/BBM2ESELg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mLnV0J1JV2NotD7G0fMaeniEAsvdI/ryPu6oPWnXY2U3InxqVUGCzWWJkd4NBmOSE 2HR/FqST6AgnTIQxs/4s9cneWaaIcqzo6w8d2oZdJbgtqPQyx8TJTkQY3K058Pn4Fx AngERUkdeTtZ1abv0L4JQVVWtv/edwywvFqeZe3c= Date: Tue, 15 Jun 2021 06:56:13 +0200 From: Greg KH To: Siddharth Gupta Cc: bjorn.andersson@linaro.org, ohad@wizery.com, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, psodagud@codeaurora.org, stable@vger.kernel.org Subject: Re: [PATCH v3 1/4] remoteproc: core: Move cdev add before device add Message-ID: References: <1623723671-5517-1-git-send-email-sidgup@codeaurora.org> <1623723671-5517-2-git-send-email-sidgup@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1623723671-5517-2-git-send-email-sidgup@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 14, 2021 at 07:21:08PM -0700, Siddharth Gupta wrote: > When cdev_add is called after device_add has been called there is no > way for the userspace to know about the addition of a cdev as cdev_add > itself doesn't trigger a uevent notification, or for the kernel to > know about the change to devt. This results in two problems: > - mknod is never called for the cdev and hence no cdev appears on > devtmpfs. > - sysfs links to the new cdev are not established. > > The cdev needs to be added and devt assigned before device_add() is > called in order for the relevant sysfs and devtmpfs entries to be > created and the uevent to be properly populated. So this means no one ever ran this code on a system that used devtmpfs? How was it ever tested?