mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[PATCH] vfs: use kstrdup() and check failing allocation
- use kstrdup() instead of kmalloc() + memcpy() - return NULL if allocating ->mnt_devname failed - mnt_devname should be const Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Acked-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
672b16b2f6
commit
88b387824f
2 changed files with 14 additions and 12 deletions
|
@ -47,7 +47,7 @@ struct vfsmount {
|
|||
struct list_head mnt_child; /* and going through their mnt_child */
|
||||
int mnt_flags;
|
||||
/* 4 bytes hole on 64bits arches */
|
||||
char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */
|
||||
const char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */
|
||||
struct list_head mnt_list;
|
||||
struct list_head mnt_expire; /* link in fs-specific expiry list */
|
||||
struct list_head mnt_share; /* circular list of shared mounts */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue