History

constify ksys_mount() string arguments

Al Viro committed 7 years ago

Commit 33488841 parent fd3e0073 files · +5 −6Browse files

Unified · Split

3 files
  1. drivers/base/devtmpfs.c +1 −2
  2. fs/namespace.c +2 −2
  3. include/linux/syscalls.h +2 −2
drivers/base/devtmpfs.c+1−2
@@ -357,8 +357,7 @@ int devtmpfs_mount(const char *mntdir) · 356 unmodified lines
357 if (!thread)357 if (!thread)
358 return 0;358 return 0;
359 359
360 err = ksys_mount("devtmpfs", (char *)mntdir, "devtmpfs", MS_SILENT,360 err = ksys_mount("devtmpfs", mntdir, "devtmpfs", MS_SILENT, NULL);
361 NULL);
362 if (err)361 if (err)
363 printk(KERN_INFO "devtmpfs: error mounting %i\n", err);362 printk(KERN_INFO "devtmpfs: error mounting %i\n", err);
364 else363 else
fs/namespace.c+2−2
@@ -3295,8 +3295,8 @@ struct dentry *mount_subtree(struct vfsmount *m, const char *name) · 3294 unmodified lines
3295}3295}
3296EXPORT_SYMBOL(mount_subtree);3296EXPORT_SYMBOL(mount_subtree);
3297 3297
3298int ksys_mount(char __user *dev_name, char __user *dir_name, char __user *type,3298int ksys_mount(const char __user *dev_name, const char __user *dir_name,
3299 unsigned long flags, void __user *data)3299 const char __user *type, unsigned long flags, void __user *data)
3300{3300{
3301 int ret;3301 int ret;
3302 char *kernel_type;3302 char *kernel_type;
include/linux/syscalls.h+2−2
@@ -1228,8 +1228,8 @@ asmlinkage long sys_ni_syscall(void); · 1227 unmodified lines
1228 * the ksys_xyzyyz() functions prototyped below.1228 * the ksys_xyzyyz() functions prototyped below.
1229 */1229 */
1230 1230
1231int ksys_mount(char __user *dev_name, char __user *dir_name, char __user *type,1231int ksys_mount(const char __user *dev_name, const char __user *dir_name,
1232 unsigned long flags, void __user *data);1232 const char __user *type, unsigned long flags, void __user *data);
1233int ksys_umount(char __user *name, int flags);1233int ksys_umount(char __user *name, int flags);
1234int ksys_dup(unsigned int fildes);1234int ksys_dup(unsigned int fildes);
1235int ksys_chroot(const char __user *filename);1235int ksys_chroot(const char __user *filename);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t