Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs updates from Al Viro: "Assorted bits and pieces" * 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: aio: drop needless assignment in aio_read() clean overflow checks in count_mounts() a bit seq_file: fix NULL pointer arithmetic warning uml/x86: use x86 load_unaligned_zeropad() asm/user.h: killed unused macros constify struct path argument of finish_automount()/do_add_mount() fs: Remove FIXME comment in generic_write_checks()
This commit is contained in:
commit
88e6c02076
|
@ -45,10 +45,4 @@ struct user {
|
|||
char u_comm[32]; /* user command name */
|
||||
};
|
||||
|
||||
#define NBPG PAGE_SIZE
|
||||
#define UPAGES 1
|
||||
#define HOST_TEXT_START_ADDR (u.start_code)
|
||||
#define HOST_DATA_START_ADDR (u.start_data)
|
||||
#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
|
||||
|
||||
#endif /* _ALPHA_USER_H */
|
||||
|
|
|
@ -77,10 +77,6 @@ struct user{
|
|||
struct user_fp_struct * u_fp0;/* Used by gdb to help find the values for */
|
||||
/* the FP registers. */
|
||||
};
|
||||
#define NBPG PAGE_SIZE
|
||||
#define UPAGES 1
|
||||
#define HOST_TEXT_START_ADDR (u.start_code)
|
||||
#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
|
||||
|
||||
/*
|
||||
* User specific VFP registers. If only VFPv2 is present, registers 16 to 31
|
||||
|
|
|
@ -67,9 +67,5 @@ struct user {
|
|||
unsigned long magic; /* To uniquely identify a core file */
|
||||
char u_comm[32]; /* User command that was responsible */
|
||||
};
|
||||
#define NBPG PAGE_SIZE
|
||||
#define UPAGES 1
|
||||
#define HOST_TEXT_START_ADDR (u.start_code)
|
||||
#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
|
||||
|
||||
#endif
|
||||
|
|
|
@ -50,10 +50,4 @@ struct user {
|
|||
char u_comm[32]; /* user command name */
|
||||
};
|
||||
|
||||
#define NBPG PAGE_SIZE
|
||||
#define UPAGES 1
|
||||
#define HOST_TEXT_START_ADDR (u.start_code)
|
||||
#define HOST_DATA_START_ADDR (u.start_data)
|
||||
#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
|
||||
|
||||
#endif /* _ASM_IA64_USER_H */
|
||||
|
|
|
@ -79,9 +79,5 @@ struct user{
|
|||
unsigned long magic; /* To uniquely identify a core file */
|
||||
char u_comm[32]; /* User command that was responsible */
|
||||
};
|
||||
#define NBPG 4096
|
||||
#define UPAGES 1
|
||||
#define HOST_TEXT_START_ADDR (u.start_code)
|
||||
#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
|
||||
|
||||
#endif
|
||||
|
|
|
@ -44,9 +44,4 @@ struct user {
|
|||
char u_comm[32]; /* user command name */
|
||||
};
|
||||
|
||||
#define NBPG PAGE_SIZE
|
||||
#define UPAGES 1
|
||||
#define HOST_TEXT_START_ADDR (u.start_code)
|
||||
#define HOST_DATA_START_ADDR (u.start_data)
|
||||
#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
|
||||
#endif /* _ASM_POWERPC_USER_H */
|
||||
|
|
|
@ -67,9 +67,5 @@ struct user {
|
|||
unsigned long magic; /* To uniquely identify a core file */
|
||||
char u_comm[32]; /* User command that was responsible */
|
||||
};
|
||||
#define NBPG PAGE_SIZE
|
||||
#define UPAGES 1
|
||||
#define HOST_TEXT_START_ADDR (u.start_code)
|
||||
#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
|
||||
|
||||
#endif /* _S390_USER_H */
|
||||
|
|
|
@ -52,10 +52,4 @@ struct user {
|
|||
char u_comm[32]; /* user command name */
|
||||
};
|
||||
|
||||
#define NBPG PAGE_SIZE
|
||||
#define UPAGES 1
|
||||
#define HOST_TEXT_START_ADDR (u.start_code)
|
||||
#define HOST_DATA_START_ADDR (u.start_data)
|
||||
#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
|
||||
|
||||
#endif /* __ASM_SH_USER_H */
|
||||
|
|
|
@ -24,7 +24,6 @@ generic-y += softirq_stack.h
|
|||
generic-y += switch_to.h
|
||||
generic-y += topology.h
|
||||
generic-y += trace_clock.h
|
||||
generic-y += word-at-a-time.h
|
||||
generic-y += kprobes.h
|
||||
generic-y += mm_hooks.h
|
||||
generic-y += vga.h
|
||||
|
|
|
@ -124,9 +124,5 @@ struct user{
|
|||
char u_comm[32]; /* User command that was responsible */
|
||||
int u_debugreg[8];
|
||||
};
|
||||
#define NBPG PAGE_SIZE
|
||||
#define UPAGES 1
|
||||
#define HOST_TEXT_START_ADDR (u.start_code)
|
||||
#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
|
||||
|
||||
#endif /* _ASM_X86_USER_32_H */
|
||||
|
|
|
@ -130,9 +130,5 @@ struct user {
|
|||
unsigned long error_code; /* CPU error code or 0 */
|
||||
unsigned long fault_address; /* CR3 or 0 */
|
||||
};
|
||||
#define NBPG PAGE_SIZE
|
||||
#define UPAGES 1
|
||||
#define HOST_TEXT_START_ADDR (u.start_code)
|
||||
#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
|
||||
|
||||
#endif /* _ASM_X86_USER_64_H */
|
||||
|
|
|
@ -93,7 +93,6 @@ __wsum csum_partial(const void *buff, int len, __wsum sum)
|
|||
buff += 8;
|
||||
}
|
||||
if (len & 7) {
|
||||
#ifdef CONFIG_DCACHE_WORD_ACCESS
|
||||
unsigned int shift = (8 - (len & 7)) * 8;
|
||||
unsigned long trail;
|
||||
|
||||
|
@ -103,31 +102,6 @@ __wsum csum_partial(const void *buff, int len, __wsum sum)
|
|||
"adcq $0,%[res]"
|
||||
: [res] "+r" (temp64)
|
||||
: [trail] "r" (trail));
|
||||
#else
|
||||
if (len & 4) {
|
||||
asm("addq %[val],%[res]\n\t"
|
||||
"adcq $0,%[res]"
|
||||
: [res] "+r" (temp64)
|
||||
: [val] "r" ((u64)*(u32 *)buff)
|
||||
: "memory");
|
||||
buff += 4;
|
||||
}
|
||||
if (len & 2) {
|
||||
asm("addq %[val],%[res]\n\t"
|
||||
"adcq $0,%[res]"
|
||||
: [res] "+r" (temp64)
|
||||
: [val] "r" ((u64)*(u16 *)buff)
|
||||
: "memory");
|
||||
buff += 2;
|
||||
}
|
||||
if (len & 1) {
|
||||
asm("addq %[val],%[res]\n\t"
|
||||
"adcq $0,%[res]"
|
||||
: [res] "+r" (temp64)
|
||||
: [val] "r" ((u64)*(u8 *)buff)
|
||||
: "memory");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
result = add32_with_carry(temp64 >> 32, temp64 & 0xffffffff);
|
||||
if (unlikely(odd)) {
|
||||
|
|
|
@ -9,6 +9,7 @@ endmenu
|
|||
config UML_X86
|
||||
def_bool y
|
||||
select ARCH_BINFMT_ELF_EXTRA_PHDRS if X86_32
|
||||
select DCACHE_WORD_ACCESS
|
||||
|
||||
config 64BIT
|
||||
bool "64-bit kernel" if "$(SUBARCH)" = "x86"
|
||||
|
|
1
fs/aio.c
1
fs/aio.c
|
@ -1552,7 +1552,6 @@ static int aio_read(struct kiocb *req, const struct iocb *iocb,
|
|||
file = req->ki_filp;
|
||||
if (unlikely(!(file->f_mode & FMODE_READ)))
|
||||
return -EBADF;
|
||||
ret = -EINVAL;
|
||||
if (unlikely(!file->f_op->read_iter))
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ int do_linkat(int olddfd, struct filename *old, int newdfd,
|
|||
* namespace.c
|
||||
*/
|
||||
extern struct vfsmount *lookup_mnt(const struct path *);
|
||||
extern int finish_automount(struct vfsmount *, struct path *);
|
||||
extern int finish_automount(struct vfsmount *, const struct path *);
|
||||
|
||||
extern int sb_prepare_remount_readonly(struct super_block *);
|
||||
|
||||
|
|
|
@ -120,13 +120,8 @@ static void *kernfs_seq_start(struct seq_file *sf, loff_t *ppos)
|
|||
if (next == ERR_PTR(-ENODEV))
|
||||
kernfs_seq_stop_active(sf, next);
|
||||
return next;
|
||||
} else {
|
||||
/*
|
||||
* The same behavior and code as single_open(). Returns
|
||||
* !NULL if pos is at the beginning; otherwise, NULL.
|
||||
*/
|
||||
return NULL + !*ppos;
|
||||
}
|
||||
return single_start(sf, ppos);
|
||||
}
|
||||
|
||||
static void *kernfs_seq_next(struct seq_file *sf, void *v, loff_t *ppos)
|
||||
|
|
|
@ -2112,22 +2112,23 @@ static int invent_group_ids(struct mount *mnt, bool recurse)
|
|||
int count_mounts(struct mnt_namespace *ns, struct mount *mnt)
|
||||
{
|
||||
unsigned int max = READ_ONCE(sysctl_mount_max);
|
||||
unsigned int mounts = 0, old, pending, sum;
|
||||
unsigned int mounts = 0;
|
||||
struct mount *p;
|
||||
|
||||
if (ns->mounts >= max)
|
||||
return -ENOSPC;
|
||||
max -= ns->mounts;
|
||||
if (ns->pending_mounts >= max)
|
||||
return -ENOSPC;
|
||||
max -= ns->pending_mounts;
|
||||
|
||||
for (p = mnt; p; p = next_mnt(p, mnt))
|
||||
mounts++;
|
||||
|
||||
old = ns->mounts;
|
||||
pending = ns->pending_mounts;
|
||||
sum = old + pending;
|
||||
if ((old > sum) ||
|
||||
(pending > sum) ||
|
||||
(max < sum) ||
|
||||
(mounts > (max - sum)))
|
||||
if (mounts > max)
|
||||
return -ENOSPC;
|
||||
|
||||
ns->pending_mounts = pending + mounts;
|
||||
ns->pending_mounts += mounts;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -2921,7 +2922,7 @@ static int do_move_mount_old(struct path *path, const char *old_name)
|
|||
* add a mount into a namespace's mount tree
|
||||
*/
|
||||
static int do_add_mount(struct mount *newmnt, struct mountpoint *mp,
|
||||
struct path *path, int mnt_flags)
|
||||
const struct path *path, int mnt_flags)
|
||||
{
|
||||
struct mount *parent = real_mount(path->mnt);
|
||||
|
||||
|
@ -3044,7 +3045,7 @@ static int do_new_mount(struct path *path, const char *fstype, int sb_flags,
|
|||
return err;
|
||||
}
|
||||
|
||||
int finish_automount(struct vfsmount *m, struct path *path)
|
||||
int finish_automount(struct vfsmount *m, const struct path *path)
|
||||
{
|
||||
struct dentry *dentry = path->dentry;
|
||||
struct mountpoint *mp;
|
||||
|
|
|
@ -1630,7 +1630,6 @@ int generic_write_checks_count(struct kiocb *iocb, loff_t *count)
|
|||
if (!*count)
|
||||
return 0;
|
||||
|
||||
/* FIXME: this is for backwards compatibility with 2.4 */
|
||||
if (iocb->ki_flags & IOCB_APPEND)
|
||||
iocb->ki_pos = i_size_read(inode);
|
||||
|
||||
|
|
|
@ -554,9 +554,9 @@ int seq_dentry(struct seq_file *m, struct dentry *dentry, const char *esc)
|
|||
}
|
||||
EXPORT_SYMBOL(seq_dentry);
|
||||
|
||||
static void *single_start(struct seq_file *p, loff_t *pos)
|
||||
void *single_start(struct seq_file *p, loff_t *pos)
|
||||
{
|
||||
return NULL + (*pos == 0);
|
||||
return *pos ? NULL : SEQ_START_TOKEN;
|
||||
}
|
||||
|
||||
static void *single_next(struct seq_file *p, void *v, loff_t *pos)
|
||||
|
|
|
@ -162,6 +162,7 @@ int seq_dentry(struct seq_file *, struct dentry *, const char *);
|
|||
int seq_path_root(struct seq_file *m, const struct path *path,
|
||||
const struct path *root, const char *esc);
|
||||
|
||||
void *single_start(struct seq_file *, loff_t *);
|
||||
int single_open(struct file *, int (*)(struct seq_file *, void *), void *);
|
||||
int single_open_size(struct file *, int (*)(struct seq_file *, void *), void *, size_t);
|
||||
int single_release(struct inode *, struct file *);
|
||||
|
|
Loading…
Reference in New Issue