* 3.4.0-rc2+: CIFS - strange file modes
@ 2012-04-13 6:12 Chris Clayton
[not found] ` <201204130712.51693.chris2553-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 5+ messages in thread
From: Chris Clayton @ 2012-04-13 6:12 UTC (permalink / raw)
To: Linux CIFS mailing list
Hi,
I'm running a kernel built from a pull from Linus last night (v3.4-rc2-174-gecca5c3), patched
with Sachin Prabhu's " Cleanup handling of NULL value passed for a mount option" patch,
which hasn't made it to Linus yet.
When I mount a partition on a small nas, I see strange file modes as is shown below:
[chris:~]$ uname -r
3.4.0-rc2+
[chris:~]$ sudo mount /media/nas/share
[chris:~]$ cp IMAG014* /media/nas/share/chris/upstairs/
[chris:~]$ ls -l /media/nas/share/chris/upstairs/
total 3980
drwxr-xr-x 2 chris users 0 Apr 13 06:55 ./
drwxr-xr-x 2 chris users 0 Apr 5 12:01 ../
--w--wx-wT 1 chris users 1255508 Apr 13 06:55 IMAG0147.jpg*
--w--wx-wT 1 chris users 1388786 Apr 13 06:55 IMAG0148.jpg*
--w--wx-wT 1 chris users 1430092 Apr 13 06:55 IMAG0149.jpg*
The related line in fstab is:
//nas/Share /media/nas/share cifs
rw,noauto,noserverino,nosuid,nodev,user,guest,uid=1002,gid=100,file_mode=0666 0 0
When I reboot into 3.3.1, the same files look fine:
[chris:~]$ uname -r
3.3.1
[chris:~]$ sudo mount /media/nas/share
[chris:~]$ ls -l /media/nas/share/chris/upstairs/
total 3980
drwxr-xr-x 2 chris users 0 Apr 13 06:55 ./
drwxr-xr-x 2 chris users 0 Apr 5 12:01 ../
-rw-rw-rw- 1 chris users 1255508 Apr 13 06:55 IMAG0147.jpg
-rw-rw-rw- 1 chris users 1388786 Apr 13 06:55 IMAG0148.jpg
-rw-rw-rw- 1 chris users 1430092 Apr 13 06:55 IMAG0149.jpg
Let me know if I can help in fixing this regression.
Please cc me on any reply - I'm not subscribed.
Chris
--
The more I see, the more I know. The more I know, the less I understand. Changing Man - Paul Weller
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] Fix number parsing in cifs_parse_mount_options
[not found] ` <201204130712.51693.chris2553-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
@ 2012-04-13 13:04 ` Sachin Prabhu
2012-04-13 13:17 ` Jeff Layton
2012-04-13 21:47 ` Chris Clayton
0 siblings, 2 replies; 5+ messages in thread
From: Sachin Prabhu @ 2012-04-13 13:04 UTC (permalink / raw)
To: Linux CIFS mailing list; +Cc: Chris Clayton
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: Sachin Prabhu <sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Reported-by: Chris Clayton <chris2553-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
---
fs/cifs/connect.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 6a86f3d..f31dc9a 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -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;
--
1.7.7.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Fix number parsing in cifs_parse_mount_options
2012-04-13 13:04 ` [PATCH] Fix number parsing in cifs_parse_mount_options Sachin Prabhu
@ 2012-04-13 13:17 ` Jeff Layton
[not found] ` <20120413091753.60dccc93-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2012-04-13 21:47 ` Chris Clayton
1 sibling, 1 reply; 5+ messages in thread
From: Jeff Layton @ 2012-04-13 13:17 UTC (permalink / raw)
To: Sachin Prabhu; +Cc: Linux CIFS mailing list, Chris Clayton
On Fri, 13 Apr 2012 14:04:32 +0100
Sachin Prabhu <sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> 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: Sachin Prabhu <sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> Reported-by: Chris Clayton <chris2553-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
>
> ---
> fs/cifs/connect.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
> index 6a86f3d..f31dc9a 100644
> --- a/fs/cifs/connect.c
> +++ b/fs/cifs/connect.c
> @@ -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;
Acked-by: Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Fix number parsing in cifs_parse_mount_options
[not found] ` <20120413091753.60dccc93-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
@ 2012-04-13 15:03 ` Steve French
0 siblings, 0 replies; 5+ messages in thread
From: Steve French @ 2012-04-13 15:03 UTC (permalink / raw)
To: Jeff Layton; +Cc: Sachin Prabhu, Linux CIFS mailing list, Chris Clayton
Merged
On Fri, Apr 13, 2012 at 8:17 AM, Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org> wrote:
> On Fri, 13 Apr 2012 14:04:32 +0100
> Sachin Prabhu <sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
>
>> 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: Sachin Prabhu <sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>> Reported-by: Chris Clayton <chris2553-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
>>
>> ---
>> fs/cifs/connect.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
>> index 6a86f3d..f31dc9a 100644
>> --- a/fs/cifs/connect.c
>> +++ b/fs/cifs/connect.c
>> @@ -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;
>
> Acked-by: Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Thanks,
Steve
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Fix number parsing in cifs_parse_mount_options
2012-04-13 13:04 ` [PATCH] Fix number parsing in cifs_parse_mount_options Sachin Prabhu
2012-04-13 13:17 ` Jeff Layton
@ 2012-04-13 21:47 ` Chris Clayton
1 sibling, 0 replies; 5+ messages in thread
From: Chris Clayton @ 2012-04-13 21:47 UTC (permalink / raw)
To: Sachin Prabhu
Cc: Linux CIFS mailing list, jlayton-eUNUBHrolfbYtjvyW6yDsg,
smfrench-Re5JQEeQqe8AvxtiuMwx3w
On 04/13/12 14:04, Sachin Prabhu wrote:
> 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: Sachin Prabhu<sprabhu-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> Reported-by: Chris Clayton<chris2553-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
>
> ---
> fs/cifs/connect.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
> index 6a86f3d..f31dc9a 100644
> --- a/fs/cifs/connect.c
> +++ b/fs/cifs/connect.c
> @@ -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;
Yes, that's fixed it. Thanks again, Sachin.
Tested-by: Chris Clayton <chris2553-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-04-13 21:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-13 6:12 3.4.0-rc2+: CIFS - strange file modes Chris Clayton
[not found] ` <201204130712.51693.chris2553-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>
2012-04-13 13:04 ` [PATCH] Fix number parsing in cifs_parse_mount_options Sachin Prabhu
2012-04-13 13:17 ` Jeff Layton
[not found] ` <20120413091753.60dccc93-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2012-04-13 15:03 ` Steve French
2012-04-13 21:47 ` Chris Clayton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.