linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: Tyler Hicks <tyhicks@canonical.com>,
	"David S. Miller" <davem@davemloft.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] sysfs: Fix regression when adding a file to an existing group
Date: Sat, 28 Jul 2018 17:47:08 +0200	[thread overview]
Message-ID: <c4c53658-be9e-6c33-1d23-f1bcb3301f48@gmail.com> (raw)
In-Reply-To: <1532727207-10912-1-git-send-email-tyhicks@canonical.com>

On 27.07.2018 23:33, Tyler Hicks wrote:
> Commit 5f81880d5204 ("sysfs, kobject: allow creating kobject belonging
> to arbitrary users") incorrectly changed the argument passed as the
> parent parameter when calling sysfs_add_file_mode_ns(). This caused some
> sysfs attribute files to not be added correctly to certain groups.
> 
> Fixes: 5f81880d5204 ("sysfs, kobject: allow creating kobject belonging to arbitrary users")
> Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
> Reported-by: Heiner Kallweit <hkallweit1@gmail.com>
> ---
> 
> Note, this was a regression exclusively in linux-next and never made it to
> Linus' tree. There's no need to queue it up for linux-stable.
> 
>  fs/sysfs/file.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
> index fa46216523cf..052e5ad9a4d2 100644
> --- a/fs/sysfs/file.c
> +++ b/fs/sysfs/file.c
> @@ -373,7 +373,7 @@ int sysfs_add_file_to_group(struct kobject *kobj,
>  		return -ENOENT;
>  
>  	kobject_get_ownership(kobj, &uid, &gid);
> -	error = sysfs_add_file_mode_ns(kobj->sd, attr, false,
> +	error = sysfs_add_file_mode_ns(parent, attr, false,
>  				       attr->mode, uid, gid, NULL);
>  	kernfs_put(parent);
>  
> 
Tested-by: Heiner Kallweit <hkallweit1@gmail.com>

  reply	other threads:[~2018-07-28 15:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-27 21:33 Tyler Hicks
2018-07-28 15:47 ` Heiner Kallweit [this message]
2018-07-29 20:11 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c4c53658-be9e-6c33-1d23-f1bcb3301f48@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dmitry.torokhov@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tyhicks@canonical.com \
    --subject='Re: [PATCH net-next] sysfs: Fix regression when adding a file to an existing group' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).