diff mbox

cifs: remove bogus call to cifs_cleanup_volume_info

Message ID 1309901857-32016-1-git-send-email-jlayton@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jeff Layton July 5, 2011, 9:37 p.m. UTC
This call to cifs_cleanup_volume_info is clearly wrong. As soon as it's
called the following call to cifs_get_tcp_session will oops as the
volume_info pointer will then be NULL.

The caller of cifs_mount should clean up this data since it passed it
in. There's no need for us to call this here.

Regression introduced by commit 724d9f1cfba.

Reported-by: Adam Williamson <awilliam@redhat.com>
Cc: Pavel Shilovsky <piastryyy@gmail.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
 fs/cifs/connect.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

Comments

Steve French July 6, 2011, 3:14 a.m. UTC | #1
merged

On Tue, Jul 5, 2011 at 4:37 PM, Jeff Layton <jlayton@redhat.com> wrote:
> This call to cifs_cleanup_volume_info is clearly wrong. As soon as it's
> called the following call to cifs_get_tcp_session will oops as the
> volume_info pointer will then be NULL.
>
> The caller of cifs_mount should clean up this data since it passed it
> in. There's no need for us to call this here.
>
> Regression introduced by commit 724d9f1cfba.
>
> Reported-by: Adam Williamson <awilliam@redhat.com>
> Cc: Pavel Shilovsky <piastryyy@gmail.com>
> Signed-off-by: Jeff Layton <jlayton@redhat.com>
> ---
>  fs/cifs/connect.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
> index c8cb83e..545e854 100644
> --- a/fs/cifs/connect.c
> +++ b/fs/cifs/connect.c
> @@ -3012,7 +3012,6 @@ try_mount_again:
>                else if (pSesInfo)
>                        cifs_put_smb_ses(pSesInfo);
>
> -               cifs_cleanup_volume_info(&volume_info);
>                FreeXid(xid);
>        }
>  #endif
> --
> 1.7.6
>
>
diff mbox

Patch

diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index c8cb83e..545e854 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -3012,7 +3012,6 @@  try_mount_again:
 		else if (pSesInfo)
 			cifs_put_smb_ses(pSesInfo);
 
-		cifs_cleanup_volume_info(&volume_info);
 		FreeXid(xid);
 	}
 #endif