affs: kstrdup() memory handling
Subsystems (2)
PATCH 1/1 affs: kstrdup() memory handling
There is a possibility of kstrdup() failure upon memory pressure. Therefore, returning ENOMEM even for new_opts.
Signed-off-by Sanidhya Kashyap <[email protected]>
--- fs/affs/super.c | 4 ++++ 1 file changed, 4 insertions(+)
fs/affs/super.c +4 -0
@@ -524,6 +524,10 @@ affs_remount(struct super_block *sb, int *flags, char *data)char volume[32 ];char *prefix =NULL ; + +if (!new_opts) +return -ENOMEM ; +pr_debug ("%s(flags=0x%x,opts=\"%s\")\n" , __func__, *flags, data);sync_filesystem (sb);
Signature · 1 line
2.1.0