Re: Cannot allocate memory error on mount

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 26 Aug 2010 14:46:09 +0530
Suresh Jayaraman <sjayaraman@xxxxxxx> 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@xxxxxxxxxx>
> Signed-off-by: Suresh Jayaraman <sjayaraman@xxxxxxx>
> ---
>  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@xxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux