提交 bfa890a3 编写于 作者: S Sachin Prabhu 提交者: Steve French

Fix number parsing in cifs_parse_mount_options

The function kstrtoul() used to parse number strings in the mount
option parser is set to expect a base 10 number . This treats the octal
numbers passed for mount options such as file_mode as base10 numbers
leading to incorrect behavior.

Change the 'base' argument passed to kstrtoul from 10 to 0 to
allow it to auto-detect the base of the number passed.
Signed-off-by: NSachin Prabhu <sprabhu@redhat.com>
Acked-by: NJeff Layton <jlayton@samba.org>
Reported-by: NChris Clayton <chris2553@googlemail.com>
Signed-off-by: NSteve French <sfrench@us.ibm.com>
上级 4fe9e963
......@@ -1123,7 +1123,7 @@ static int get_option_ul(substring_t args[], unsigned long *option)
string = match_strdup(args);
if (string == NULL)
return -ENOMEM;
rc = kstrtoul(string, 10, option);
rc = kstrtoul(string, 0, option);
kfree(string);
return rc;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册