public inbox for driver-core@lists.linux.dev
 help / color / mirror / Atom feed
From: Lee Jones <lee@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: rafael@kernel.org, dakr@kernel.org, driver-core@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] sysfs: remove exports of sysfs_*change_owner()
Date: Thu, 5 Feb 2026 14:35:11 +0000	[thread overview]
Message-ID: <20260205143511.GA1625457@google.com> (raw)
In-Reply-To: <2026020541-energize-graduate-981a@gregkh>

On Thu, 05 Feb 2026, Greg Kroah-Hartman wrote:

> Both sysfs_change_owner() and sysfs_file_change_owner() are exported to
> modules, but there are no in-kernel module users, so remove the exports
> so that crazy out-of-tree drivers don't get the impression that it is
> safe to call these functions at all.
> 
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Reported-by: Lee Jones <lee@kernel.org>
Reviewed-by: Lee Jones <lee@kernel.org>

:)

> ---
>  fs/sysfs/file.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
> index 3825e780cc58..a8176c875f55 100644
> --- a/fs/sysfs/file.c
> +++ b/fs/sysfs/file.c
> @@ -689,7 +689,6 @@ int sysfs_file_change_owner(struct kobject *kobj, const char *name, kuid_t kuid,
>  
>  	return error;
>  }
> -EXPORT_SYMBOL_GPL(sysfs_file_change_owner);
>  
>  /**
>   *	sysfs_change_owner - change owner of the given object.
> @@ -736,7 +735,6 @@ int sysfs_change_owner(struct kobject *kobj, kuid_t kuid, kgid_t kgid)
>  
>  	return 0;
>  }
> -EXPORT_SYMBOL_GPL(sysfs_change_owner);
>  
>  /**
>   *	sysfs_emit - scnprintf equivalent, aware of PAGE_SIZE buffer.
> -- 
> 2.53.0
> 

-- 
Lee Jones [李琼斯]

      parent reply	other threads:[~2026-02-05 14:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-05 13:09 [PATCH 1/2] sysfs: remove exports of sysfs_*change_owner() Greg Kroah-Hartman
2026-02-05 13:09 ` [PATCH 2/2] driver core: remove device_change_owner() export Greg Kroah-Hartman
2026-02-05 13:15   ` Danilo Krummrich
2026-02-05 13:39   ` Rafael J. Wysocki
2026-02-05 13:15 ` [PATCH 1/2] sysfs: remove exports of sysfs_*change_owner() Danilo Krummrich
2026-02-05 13:38 ` Rafael J. Wysocki
2026-02-05 14:35 ` Lee Jones [this message]

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=20260205143511.GA1625457@google.com \
    --to=lee@kernel.org \
    --cc=dakr@kernel.org \
    --cc=driver-core@lists.linux.dev \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox