All of lore.kernel.org
 help / color / mirror / Atom feed
* Cannot allocate memory error on mount
@ 2010-08-25 20:26 joe hefner
       [not found] ` <514808.54527.qm-21+BQsVhpP+B9c0Qi4KiSs0jms80CZx+QQ4Iyu8u01E@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: joe hefner @ 2010-08-25 20:26 UTC (permalink / raw)
  To: linux-cifs-u79uwXL29TY76Z2rM5mHXA

On a recent Fedora (13), I am seeing a mount failure message that I can not explain. I have a Windows Server 2003 a with a share set up for access only for a specific username (say userfoo). If I try to mount it from Linux, using userfoo and the correct password all is well. If I try with a bad password or with some other username (userbar), it fails with "Permission denied" as expected. If I try to mount as username = administrator, and give the correct administrator password, I would also expect "Permission denied", but I see "Cannot allocate memory" instead.
 
dmesg and /var/log/messages show an odd entry about failure to get root inode. Setting cifsFYI shows that errno 13 is being seen on the client side, but then this inode error occurs.
 
Has anyone seen this? Any ideas what is happening?
 
Thanks, Joe H.
 
 fs/cifs/netmisc.c: Mapping smb error code 5 to POSIX err -13
 fs/cifs/cifssmb.c: Send error in QPathInfo = -13
 CIFS VFS: cifs_read_super: get root inode failed
 fs/cifs/connect.c: CIFS VFS: in cifs_put_tcon as Xid: 44322319 with uid: 0
 fs/cifs/cifssmb.c: In tree disconnect
 fs/cifs/transport.c: For smb_command 113
 fs/cifs/transport.c: Sending smb:  total_len 39
 fs/cifs/connect.c: rfc1002 length 0x27
 fs/cifs/connect.c: CIFS VFS: in cifs_put_smb_ses as Xid: 44322320 with uid: 0
 fs/cifs/cifssmb.c: In SMBLogoff for session disconnect
 fs/cifs/transport.c: For smb_command 116
 fs/cifs/transport.c: Sending smb:  total_len 43
 fs/cifs/connect.c: rfc1002 length 0x2b




      

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Cannot allocate memory error on mount
       [not found] ` <514808.54527.qm-21+BQsVhpP+B9c0Qi4KiSs0jms80CZx+QQ4Iyu8u01E@public.gmane.org>
@ 2010-08-26  9:16   ` Suresh Jayaraman
       [not found]     ` <4C7630D9.7060203-l3A5Bk7waGM@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Suresh Jayaraman @ 2010-08-26  9:16 UTC (permalink / raw)
  To: joe hefner, Steve French; +Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA, Jeff Layton

On 08/26/2010 01:56 AM, joe hefner wrote:
> On a recent Fedora (13), I am seeing a mount failure message that I can not explain. I have a Windows Server 2003ýa with a share set up for access only for a specific username (say userfoo). If I try to mount it from Linux,ýusing userfoo and the correct password all is well. If I try with a bad password or with some other username (userbar), it fails with "Permission denied" as expected. If I try to mount as username = administrator, and give the correct administrator password, I would also expect "Permission denied", but I see "Cannot allocate memory" instead.
> ý
> dmesg and /var/log/messages show an oddýentry about failure to get root inode. Setting cifsFYI shows that errno 13 is being seen on the client side, but then thisýinode error occurs.
> ý
> Has anyone seen this? Any ideas what is happening?
> ý
> Thanks, Joe H.
> ý
> ýfs/cifs/netmisc.c: Mapping smb error code 5 to POSIX err -13
> ýfs/cifs/cifssmb.c: Send error in QPathInfo = -13
> ýCIFS VFS: cifs_read_super: get root inode failed
> ýfs/cifs/connect.c: CIFS VFS: in cifs_put_tcon as Xid: 44322319 with uid: 0
> ýfs/cifs/cifssmb.c: In tree disconnect
> ýfs/cifs/transport.c: For smb_command 113
> ýfs/cifs/transport.c: Sending smb:ý total_len 39
> ýfs/cifs/connect.c: rfc1002 length 0x27
> ýfs/cifs/connect.c: CIFS VFS: in cifs_put_smb_ses as Xid: 44322320 with uid: 0
> ýfs/cifs/cifssmb.c: In SMBLogoff for session disconnect
> ýfs/cifs/transport.c: For smb_command 116
> ýfs/cifs/transport.c: Sending smb:ý total_len 43
> ýfs/cifs/connect.c: rfc1002 length 0x2b
> 

Looks like the commit 0b8f18e3 assumed that cifs_get_inode_info() and
friends fail only due to memory allocation error when the inode is NULL
which is not the case if CIFSSMBQPathInfo() fails and returns an error.
Fix this by propagating the actual error code back.

Cc: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
---
 fs/cifs/inode.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 4bc47e5..86a164f 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -834,7 +834,7 @@ struct inode *cifs_root_iget(struct super_block *sb, unsigned long ino)
 						xid, NULL);
 
 	if (!inode)
-		return ERR_PTR(-ENOMEM);
+		return ERR_PTR(rc);
 
 #ifdef CONFIG_CIFS_FSCACHE
 	/* populate tcon->resource_id */

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: Cannot allocate memory error on mount
       [not found]     ` <4C7630D9.7060203-l3A5Bk7waGM@public.gmane.org>
@ 2010-08-26 12:23       ` Jeff Layton
       [not found]         ` <20100826082305.1594ec4e-xSBYVWDuneFaJnirhKH9O4GKTjYczspe@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Jeff Layton @ 2010-08-26 12:23 UTC (permalink / raw)
  To: Suresh Jayaraman
  Cc: joe hefner, Steve French, linux-cifs-u79uwXL29TY76Z2rM5mHXA

On Thu, 26 Aug 2010 14:46:09 +0530
Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org> wrote:

> On 08/26/2010 01:56 AM, joe hefner wrote:
> > On a recent Fedora (13), I am seeing a mount failure message that I can not explain. I have a Windows Server 2003ýa with a share set up for access only for a specific username (say userfoo). If I try to mount it from Linux,ýusing userfoo and the correct password all is well. If I try with a bad password or with some other username (userbar), it fails with "Permission denied" as expected. If I try to mount as username = administrator, and give the correct administrator password, I would also expect "Permission denied", but I see "Cannot allocate memory" instead.
> > ý
> > dmesg and /var/log/messages show an oddýentry about failure to get root inode. Setting cifsFYI shows that errno 13 is being seen on the client side, but then thisýinode error occurs.
> > ý
> > Has anyone seen this? Any ideas what is happening?
> > ý
> > Thanks, Joe H.
> > ý
> > ýfs/cifs/netmisc.c: Mapping smb error code 5 to POSIX err -13
> > ýfs/cifs/cifssmb.c: Send error in QPathInfo = -13
> > ýCIFS VFS: cifs_read_super: get root inode failed
> > ýfs/cifs/connect.c: CIFS VFS: in cifs_put_tcon as Xid: 44322319 with uid: 0
> > ýfs/cifs/cifssmb.c: In tree disconnect
> > ýfs/cifs/transport.c: For smb_command 113
> > ýfs/cifs/transport.c: Sending smb:ý total_len 39
> > ýfs/cifs/connect.c: rfc1002 length 0x27
> > ýfs/cifs/connect.c: CIFS VFS: in cifs_put_smb_ses as Xid: 44322320 with uid: 0
> > ýfs/cifs/cifssmb.c: In SMBLogoff for session disconnect
> > ýfs/cifs/transport.c: For smb_command 116
> > ýfs/cifs/transport.c: Sending smb:ý total_len 43
> > ýfs/cifs/connect.c: rfc1002 length 0x2b
> > 
> 
> Looks like the commit 0b8f18e3 assumed that cifs_get_inode_info() and
> friends fail only due to memory allocation error when the inode is NULL
> which is not the case if CIFSSMBQPathInfo() fails and returns an error.
> Fix this by propagating the actual error code back.
> 
> Cc: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
> ---
>  fs/cifs/inode.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
> index 4bc47e5..86a164f 100644
> --- a/fs/cifs/inode.c
> +++ b/fs/cifs/inode.c
> @@ -834,7 +834,7 @@ struct inode *cifs_root_iget(struct super_block *sb, unsigned long ino)
>  						xid, NULL);
>  
>  	if (!inode)
> -		return ERR_PTR(-ENOMEM);
> +		return ERR_PTR(rc);
>  
>  #ifdef CONFIG_CIFS_FSCACHE
>  	/* populate tcon->resource_id */

Good catch.

Acked-by: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Cannot allocate memory error on mount
       [not found]         ` <20100826082305.1594ec4e-xSBYVWDuneFaJnirhKH9O4GKTjYczspe@public.gmane.org>
@ 2010-08-26 16:25           ` Steve French
       [not found]             ` <AANLkTi=qnTFUcnu-uS8NGTkjYUhO-hHstargorpJ8yZ9-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Steve French @ 2010-08-26 16:25 UTC (permalink / raw)
  To: Jeff Layton
  Cc: Suresh Jayaraman, joe hefner, linux-cifs-u79uwXL29TY76Z2rM5mHXA

This is a good one to go upstream soon - if others critical to go
upstream soon let me know.

On Thu, Aug 26, 2010 at 7:23 AM, Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> On Thu, 26 Aug 2010 14:46:09 +0530
> Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org> wrote:
>
>> On 08/26/2010 01:56 AM, joe hefner wrote:
>> > On a recent Fedora (13), I am seeing a mount failure message that I can not explain. I have a Windows Server 2003ýa with a share set up for access only for a specific username (say userfoo). If I try to mount it from Linux,ýusing userfoo and the correct password all is well. If I try with a bad password or with some other username (userbar), it fails with "Permission denied" as expected. If I try to mount as username = administrator, and give the correct administrator password, I would also expect "Permission denied", but I see "Cannot allocate memory" instead.
>> > ý
>> > dmesg and /var/log/messages show an oddýentry about failure to get root inode. Setting cifsFYI shows that errno 13 is being seen on the client side, but then thisýinode error occurs.
>> > ý
>> > Has anyone seen this? Any ideas what is happening?
>> > ý
>> > Thanks, Joe H.
>> > ý
>> > ýfs/cifs/netmisc.c: Mapping smb error code 5 to POSIX err -13
>> > ýfs/cifs/cifssmb.c: Send error in QPathInfo = -13
>> > ýCIFS VFS: cifs_read_super: get root inode failed
>> > ýfs/cifs/connect.c: CIFS VFS: in cifs_put_tcon as Xid: 44322319 with uid: 0
>> > ýfs/cifs/cifssmb.c: In tree disconnect
>> > ýfs/cifs/transport.c: For smb_command 113
>> > ýfs/cifs/transport.c: Sending smb:ý total_len 39
>> > ýfs/cifs/connect.c: rfc1002 length 0x27
>> > ýfs/cifs/connect.c: CIFS VFS: in cifs_put_smb_ses as Xid: 44322320 with uid: 0
>> > ýfs/cifs/cifssmb.c: In SMBLogoff for session disconnect
>> > ýfs/cifs/transport.c: For smb_command 116
>> > ýfs/cifs/transport.c: Sending smb:ý total_len 43
>> > ýfs/cifs/connect.c: rfc1002 length 0x2b
>> >
>>
>> Looks like the commit 0b8f18e3 assumed that cifs_get_inode_info() and
>> friends fail only due to memory allocation error when the inode is NULL
>> which is not the case if CIFSSMBQPathInfo() fails and returns an error.
>> Fix this by propagating the actual error code back.
>>
>> Cc: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>> Signed-off-by: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
>> ---
>>  fs/cifs/inode.c |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
>> index 4bc47e5..86a164f 100644
>> --- a/fs/cifs/inode.c
>> +++ b/fs/cifs/inode.c
>> @@ -834,7 +834,7 @@ struct inode *cifs_root_iget(struct super_block *sb, unsigned long ino)
>>                                               xid, NULL);
>>
>>       if (!inode)
>> -             return ERR_PTR(-ENOMEM);
>> +             return ERR_PTR(rc);
>>
>>  #ifdef CONFIG_CIFS_FSCACHE
>>       /* populate tcon->resource_id */
>
> Good catch.
>
> Acked-by: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>



-- 
Thanks,

Steve

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Cannot allocate memory error on mount
       [not found]             ` <AANLkTi=qnTFUcnu-uS8NGTkjYUhO-hHstargorpJ8yZ9-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2010-08-27  6:24               ` Suresh Jayaraman
       [not found]                 ` <4C775A03.8010507-l3A5Bk7waGM@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Suresh Jayaraman @ 2010-08-27  6:24 UTC (permalink / raw)
  To: Steve French, Jeff Layton; +Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA

On 08/26/2010 09:55 PM, Steve French wrote:
> This is a good one to go upstream soon - if others critical to go
> upstream soon let me know.

Do we need to Cc -stable as well? I don't feel strongly that we should
include this fix. However, unrelated memory allocation errors during
mount in supported kernels sounds more than annoying..

Thoughts?


> On Thu, Aug 26, 2010 at 7:23 AM, Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
>> On Thu, 26 Aug 2010 14:46:09 +0530
>> Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org> wrote:
>>
>>> On 08/26/2010 01:56 AM, joe hefner wrote:
>>>> On a recent Fedora (13), I am seeing a mount failure message that I can not explain. I have a Windows Server 2003�a with a share set up for access only for a specific username (say userfoo). If I try to mount it from Linux,�using userfoo and the correct password all is well. If I try with a bad password or with some other username (userbar), it fails with "Permission denied" as expected. If I try to mount as username = administrator, and give the correct administrator password, I would also expect "Permission denied", but I see "Cannot allocate memory" instead.
>>>> �
>>>> dmesg and /var/log/messages show an odd�entry about failure to get root inode. Setting cifsFYI shows that errno 13 is being seen on the client side, but then this�inode error occurs.
>>>> �
>>>> Has anyone seen this? Any ideas what is happening?
>>>> �
>>>> Thanks, Joe H.
>>>> �
>>>> �fs/cifs/netmisc.c: Mapping smb error code 5 to POSIX err -13
>>>> �fs/cifs/cifssmb.c: Send error in QPathInfo = -13
>>>> �CIFS VFS: cifs_read_super: get root inode failed
>>>> �fs/cifs/connect.c: CIFS VFS: in cifs_put_tcon as Xid: 44322319 with uid: 0
>>>> �fs/cifs/cifssmb.c: In tree disconnect
>>>> �fs/cifs/transport.c: For smb_command 113
>>>> �fs/cifs/transport.c: Sending smb:� total_len 39
>>>> �fs/cifs/connect.c: rfc1002 length 0x27
>>>> �fs/cifs/connect.c: CIFS VFS: in cifs_put_smb_ses as Xid: 44322320 with uid: 0
>>>> �fs/cifs/cifssmb.c: In SMBLogoff for session disconnect
>>>> �fs/cifs/transport.c: For smb_command 116
>>>> �fs/cifs/transport.c: Sending smb:� total_len 43
>>>> �fs/cifs/connect.c: rfc1002 length 0x2b
>>>>
>>>
>>> Looks like the commit 0b8f18e3 assumed that cifs_get_inode_info() and
>>> friends fail only due to memory allocation error when the inode is NULL
>>> which is not the case if CIFSSMBQPathInfo() fails and returns an error.
>>> Fix this by propagating the actual error code back.
>>>
>>> Cc: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>>> Signed-off-by: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org>
>>> ---
>>> �fs/cifs/inode.c | � �2 +-
>>> �1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
>>> index 4bc47e5..86a164f 100644
>>> --- a/fs/cifs/inode.c
>>> +++ b/fs/cifs/inode.c
>>> @@ -834,7 +834,7 @@ struct inode *cifs_root_iget(struct super_block *sb, unsigned long ino)
>>> � � � � � � � � � � � � � � � � � � � � � � � xid, NULL);
>>>
>>> � � � if (!inode)
>>> - � � � � � � return ERR_PTR(-ENOMEM);
>>> + � � � � � � return ERR_PTR(rc);
>>>
>>> �#ifdef CONFIG_CIFS_FSCACHE
>>> � � � /* populate tcon->resource_id */
>>
>> Good catch.
>>
>> Acked-by: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>>
> 
> 
> 


-- 
Suresh Jayaraman

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Cannot allocate memory error on mount
       [not found]                 ` <4C775A03.8010507-l3A5Bk7waGM@public.gmane.org>
@ 2010-08-27 11:17                   ` Jeff Layton
  0 siblings, 0 replies; 6+ messages in thread
From: Jeff Layton @ 2010-08-27 11:17 UTC (permalink / raw)
  To: Suresh Jayaraman; +Cc: Steve French, linux-cifs-u79uwXL29TY76Z2rM5mHXA

On Fri, 27 Aug 2010 11:54:03 +0530
Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org> wrote:

> On 08/26/2010 09:55 PM, Steve French wrote:
> > This is a good one to go upstream soon - if others critical to go
> > upstream soon let me know.
> 
> Do we need to Cc -stable as well? I don't feel strongly that we should
> include this fix. However, unrelated memory allocation errors during
> mount in supported kernels sounds more than annoying..
> 
> Thoughts?
> 

It doesn't seem like stable material to me. It's an annoyance, but not a
security or stability fix as far as I can see...

-- 
Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-08-27 11:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-25 20:26 Cannot allocate memory error on mount joe hefner
     [not found] ` <514808.54527.qm-21+BQsVhpP+B9c0Qi4KiSs0jms80CZx+QQ4Iyu8u01E@public.gmane.org>
2010-08-26  9:16   ` Suresh Jayaraman
     [not found]     ` <4C7630D9.7060203-l3A5Bk7waGM@public.gmane.org>
2010-08-26 12:23       ` Jeff Layton
     [not found]         ` <20100826082305.1594ec4e-xSBYVWDuneFaJnirhKH9O4GKTjYczspe@public.gmane.org>
2010-08-26 16:25           ` Steve French
     [not found]             ` <AANLkTi=qnTFUcnu-uS8NGTkjYUhO-hHstargorpJ8yZ9-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-08-27  6:24               ` Suresh Jayaraman
     [not found]                 ` <4C775A03.8010507-l3A5Bk7waGM@public.gmane.org>
2010-08-27 11:17                   ` Jeff Layton

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.