linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] remove PDE_DATA()
@ 2021-11-01  9:35 Muchun Song
  2021-11-01  9:35 ` [PATCH 1/4] fs: proc: store PDE()->data into inode->i_private Muchun Song
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Muchun Song @ 2021-11-01  9:35 UTC (permalink / raw)
  To: akpm, adobriyan, gladkov.alexey; +Cc: linux-kernel, linux-fsdevel, Muchun Song

I found a bug [1] some days ago, which is because we want to use
inode->i_private to pass user private data. However, this is wrong
on proc fs. We provide a specific function PDE_DATA() to get user
private data. Actually, we can hide this detail by storing
PDE()->data into inode->i_private and removing PDE_DATA() completely.
The user could use inode->i_private to get user private data just
like debugfs does. This series is trying to remove PDE_DATA().

[1] https://lore.kernel.org/lkml/20211029032638.84884-1-songmuchun@bytedance.com/

Muchun Song (4):
  fs: proc: store PDE()->data into inode->i_private
  fs: proc: replace PDE_DATA(inode) with inode->i_private
  fs: proc: remove PDE_DATA()
  fs: proc: use DEFINE_PROC_SHOW_ATTRIBUTE() to simplify the code

 arch/alpha/kernel/srm_env.c                        |  4 ++--
 arch/arm/kernel/atags_proc.c                       |  2 +-
 arch/ia64/kernel/salinfo.c                         | 10 ++++-----
 arch/powerpc/kernel/proc_powerpc.c                 |  4 ++--
 arch/sh/mm/alignment.c                             |  2 +-
 arch/xtensa/platforms/iss/simdisk.c                |  4 ++--
 drivers/acpi/proc.c                                |  2 +-
 drivers/hwmon/dell-smm-hwmon.c                     |  4 ++--
 drivers/net/bonding/bond_procfs.c                  |  8 ++++----
 drivers/net/wireless/cisco/airo.c                  | 22 ++++++++++----------
 drivers/net/wireless/intersil/hostap/hostap_ap.c   | 16 +++++++--------
 .../net/wireless/intersil/hostap/hostap_download.c |  2 +-
 drivers/net/wireless/intersil/hostap/hostap_proc.c | 24 +++++++++++-----------
 drivers/net/wireless/ray_cs.c                      |  2 +-
 drivers/nubus/proc.c                               |  2 +-
 drivers/parisc/led.c                               |  4 ++--
 drivers/pci/proc.c                                 | 10 ++++-----
 drivers/platform/x86/thinkpad_acpi.c               |  4 ++--
 drivers/platform/x86/toshiba_acpi.c                | 16 +++++++--------
 drivers/pnp/isapnp/proc.c                          |  2 +-
 drivers/pnp/pnpbios/proc.c                         |  4 ++--
 drivers/scsi/scsi_proc.c                           |  4 ++--
 drivers/usb/gadget/function/rndis.c                |  4 ++--
 drivers/zorro/proc.c                               |  2 +-
 fs/afs/proc.c                                      |  6 +++---
 fs/cifs/cifs_debug.c                               | 17 ++-------------
 fs/ext4/mballoc.c                                  | 14 ++++++-------
 fs/jbd2/journal.c                                  |  2 +-
 fs/nfsd/stats.c                                    | 15 ++------------
 fs/proc/generic.c                                  |  6 ------
 fs/proc/inode.c                                    |  1 +
 fs/proc/internal.h                                 |  5 -----
 fs/proc/proc_net.c                                 | 12 +++++------
 include/linux/proc_fs.h                            |  2 --
 include/linux/seq_file.h                           |  2 +-
 ipc/util.c                                         |  2 +-
 kernel/irq/proc.c                                  |  8 ++++----
 kernel/resource.c                                  |  4 ++--
 net/atm/proc.c                                     |  4 ++--
 net/bluetooth/af_bluetooth.c                       |  8 ++++----
 net/can/bcm.c                                      |  2 +-
 net/can/proc.c                                     |  2 +-
 net/core/neighbour.c                               |  6 +++---
 net/core/pktgen.c                                  |  6 +++---
 net/ipv4/netfilter/ipt_CLUSTERIP.c                 |  6 +++---
 net/ipv4/raw.c                                     |  8 ++++----
 net/ipv4/tcp_ipv4.c                                |  2 +-
 net/ipv4/udp.c                                     |  6 +++---
 net/netfilter/x_tables.c                           | 10 ++++-----
 net/netfilter/xt_hashlimit.c                       | 18 ++++++++--------
 net/netfilter/xt_recent.c                          |  4 ++--
 net/sunrpc/auth_gss/svcauth_gss.c                  |  4 ++--
 net/sunrpc/cache.c                                 | 24 +++++++++++-----------
 net/sunrpc/stats.c                                 | 15 ++------------
 sound/core/info.c                                  |  4 ++--
 55 files changed, 168 insertions(+), 215 deletions(-)

-- 
2.11.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-11-17  8:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-01  9:35 [PATCH 0/4] remove PDE_DATA() Muchun Song
2021-11-01  9:35 ` [PATCH 1/4] fs: proc: store PDE()->data into inode->i_private Muchun Song
2021-11-01  9:35 ` [PATCH 2/4] fs: proc: replace PDE_DATA(inode) with inode->i_private Muchun Song
2021-11-01  9:35 ` [PATCH 3/4] fs: proc: remove PDE_DATA() Muchun Song
2021-11-01  9:35 ` [PATCH 4/4] fs: proc: use DEFINE_PROC_SHOW_ATTRIBUTE() to simplify the code Muchun Song
2021-11-16  5:09 ` [PATCH 0/4] remove PDE_DATA() Andrew Morton
2021-11-16  8:26   ` Muchun Song
2021-11-16 20:01     ` Andrew Morton
2021-11-17  8:24       ` Muchun Song

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).