vfs: delete fasync_struct.magic
Subsystems (7)
Documentation VFS File locking (flock() and fcntl()/lockf()) Chinese documentation +3 more subsystems
PATCH 1/1 vfs: delete fasync_struct.magic
Memory corruptions are supposed to be found by KASAN these days.
Signed-off-by Alexey Dobriyan <[email protected]>
--- Documentation/staging/magic-number.rst | 1 - Documentation/translations/it_IT/staging/magic-number.rst | 1 - Documentation/translations/sp_SP/process/magic-number.rst | 1 - Documentation/translations/zh_CN/process/magic-number.rst | 1 - Documentation/translations/zh_TW/process/magic-number.rst | 1 - fs/fcntl.c | 6 ------ include/linux/fs.h | 3 --- 7 files changed, 14 deletions(-)
Documentation/staging/magic-number.rst +0 -1
@@ -70,7 +70,6 @@ Magic Name Number Structure File ===================== ================ ======================== ========================================== PG_MAGIC 'P' pg_{read,write}_hdr ``include/uapi/linux/pg.h`` APM_BIOS_MAGIC 0x4101 apm_user ``arch/x86/kernel/apm_32.c`` -FASYNC_MAGIC 0x4601 fasync_struct ``include/linux/fs.h`` SLIP_MAGIC 0x5302 slip ``drivers/net/slip/slip.h`` KV_MAGIC 0x5f4b565f kernel_vars_s ``arch/mips/include/asm/sn/klkernvars.h`` CODA_MAGIC 0xC0DAC0DA coda_file_info ``fs/coda/coda_fs_i.h``
Documentation/translations/it_IT/staging/magic-number.rst +0 -1
@@ -76,7 +76,6 @@ Nome magico Numero Struttura File ===================== ================ ======================== ========================================== PG_MAGIC 'P' pg_{read,write}_hdr ``include/linux/pg.h`` APM_BIOS_MAGIC 0x4101 apm_user ``arch/x86/kernel/apm_32.c`` -FASYNC_MAGIC 0x4601 fasync_struct ``include/linux/fs.h`` SLIP_MAGIC 0x5302 slip ``drivers/net/slip.h`` KV_MAGIC 0x5f4b565f kernel_vars_s ``arch/mips/include/asm/sn/klkernvars.h`` CODA_MAGIC 0xC0DAC0DA coda_file_info ``fs/coda/coda_fs_i.h``
Documentation/translations/sp_SP/process/magic-number.rst +0 -1
@@ -75,7 +75,6 @@ Magic Name Number Structure File ===================== ================ ======================== ========================================== PG_MAGIC 'P' pg_{read,write}_hdr ``include/linux/pg.h`` APM_BIOS_MAGIC 0x4101 apm_user ``arch/x86/kernel/apm_32.c`` -FASYNC_MAGIC 0x4601 fasync_struct ``include/linux/fs.h`` SLIP_MAGIC 0x5302 slip ``drivers/net/slip.h`` KV_MAGIC 0x5f4b565f kernel_vars_s ``arch/mips/include/asm/sn/klkernvars.h`` CODA_MAGIC 0xC0DAC0DA coda_file_info ``fs/coda/coda_fs_i.h``
Documentation/translations/zh_CN/process/magic-number.rst +0 -1
@@ -68,7 +68,6 @@ tty源码经常通过特定驱动使用这种方法用来反复地排列特定 ===================== ================ ======================== ========================================== PG_MAGIC 'P' pg_{read,write}_hdr ``include/linux/pg.h`` APM_BIOS_MAGIC 0x4101 apm_user ``arch/x86/kernel/apm_32.c`` -FASYNC_MAGIC 0x4601 fasync_struct ``include/linux/fs.h`` SLIP_MAGIC 0x5302 slip ``drivers/net/slip.h`` KV_MAGIC 0x5f4b565f kernel_vars_s ``arch/mips/include/asm/sn/klkernvars.h`` CODA_MAGIC 0xC0DAC0DA coda_file_info ``fs/coda/coda_fs_i.h``
Documentation/translations/zh_TW/process/magic-number.rst +0 -1
@@ -62,7 +62,6 @@ Linux 魔術數 ===================== ================ ======================== ========================================== PG_MAGIC 'P' pg_{read,write}_hdr ``include/linux/pg.h`` APM_BIOS_MAGIC 0x4101 apm_user ``arch/x86/kernel/apm_32.c`` -FASYNC_MAGIC 0x4601 fasync_struct ``include/linux/fs.h`` SLIP_MAGIC 0x5302 slip ``drivers/net/slip.h`` KV_MAGIC 0x5f4b565f kernel_vars_s ``arch/mips/include/asm/sn/klkernvars.h`` CODA_MAGIC 0xC0DAC0DA coda_file_info ``fs/coda/coda_fs_i.h``
fs/fcntl.c +0 -6
@@ -1066,7 +1066,6 @@ struct fasync_struct *fasync_insert_entry(int fd, struct file *filp, struct fasy }rwlock_init (&new->fa_lock); - new->magic =FASYNC_MAGIC ; new->fa_file = filp; new->fa_fd = fd; new->fa_next = *fapp;
@@ -1130,11 +1129,6 @@ static void kill_fasync_rcu(struct fasync_struct *fa, int sig, int band)struct fown_struct *fown;unsigned long flags; -if (fa->magic !=FASYNC_MAGIC ) { -printk (KERN_ERR "kill_fasync: bad magic number in " -"fasync_struct!\n" ); -return ; - }read_lock_irqsave (&fa->fa_lock, flags);if (fa->fa_file) { fown =file_f_owner (fa->fa_file);
include/linux/fs.h +0 -3
@@ -1369,15 +1369,12 @@ static inline struct dentry *file_dentry(const struct file *file)struct fasync_struct {rwlock_t fa_lock; -int magic;int fa_fd;struct fasync_struct *fa_next;/* singly linked list */ struct file *fa_file;struct rcu_head fa_rcu; }; -#define FASYNC_MAGIC 0x4601 -/* SMP safe fasync helpers: */ extern int fasync_helper (int ,struct file *,int ,struct fasync_struct **);extern struct fasync_struct *fasync_insert_entry (int ,struct file *,struct fasync_struct **,struct fasync_struct *);
Signature · 1 line
2.56.1