* [PATCH] FS: cifs: Fix compile warning
@ 2010-09-11 0:45 ` Javier Martinez Canillas
0 siblings, 0 replies; 4+ messages in thread
From: Javier Martinez Canillas @ 2010-09-11 0:45 UTC (permalink / raw)
To: Steve French, Jeff Layton, Suresh Jayaraman, Shirish Pargaonkar,
linux-cifs-u79uwXL29TY76Z2rM5mHXA
In today linux-next I got a compile warning due a possibly uninitialized variable
This trivial patch solves the issue
Thanks a lot
Signed-off-by: Javier Martinez Canillas <martinez.javier-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
fs/cifs/cifssmb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index c65c341..ee1bba4 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -3079,7 +3079,7 @@ CIFSSMBGetCIFSACL(const int xid, struct cifsTconInfo *tcon, __u16 fid,
__u32 parm_len;
__u32 acl_len;
struct smb_com_ntransact_rsp *pSMBr;
- char *pdata;
+ char *pdata = NULL;
/* validate_nttransact */
rc = validate_ntransact(iov[0].iov_base, (char **)&parm,
--
1.7.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] FS: cifs: Fix compile warning
@ 2010-09-11 0:45 ` Javier Martinez Canillas
0 siblings, 0 replies; 4+ messages in thread
From: Javier Martinez Canillas @ 2010-09-11 0:45 UTC (permalink / raw)
To: Steve French, Jeff Layton, Suresh Jayaraman, Shirish Pargaonkar,
linux-cifs, samba-technical, linux-kernel
In today linux-next I got a compile warning due a possibly uninitialized variable
This trivial patch solves the issue
Thanks a lot
Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
---
fs/cifs/cifssmb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index c65c341..ee1bba4 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -3079,7 +3079,7 @@ CIFSSMBGetCIFSACL(const int xid, struct cifsTconInfo *tcon, __u16 fid,
__u32 parm_len;
__u32 acl_len;
struct smb_com_ntransact_rsp *pSMBr;
- char *pdata;
+ char *pdata = NULL;
/* validate_nttransact */
rc = validate_ntransact(iov[0].iov_base, (char **)&parm,
--
1.7.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] FS: cifs: Fix compile warning
2010-09-11 0:45 ` Javier Martinez Canillas
@ 2010-09-13 16:30 ` Steve French
-1 siblings, 0 replies; 4+ messages in thread
From: Steve French @ 2010-09-13 16:30 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: Steve French, Jeff Layton, Suresh Jayaraman, Shirish Pargaonkar,
linux-cifs-u79uwXL29TY76Z2rM5mHXA,
samba-technical-w/Ol4Ecudpl8XjKLYN78aQ,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
On Fri, Sep 10, 2010 at 7:45 PM, Javier Martinez Canillas
<martinez.javier-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> In today linux-next I got a compile warning due a possibly uninitialized variable
>
> This trivial patch solves the issue
>
> Thanks a lot
>
> Signed-off-by: Javier Martinez Canillas <martinez.javier-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> fs/cifs/cifssmb.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
> index c65c341..ee1bba4 100644
> --- a/fs/cifs/cifssmb.c
> +++ b/fs/cifs/cifssmb.c
> @@ -3079,7 +3079,7 @@ CIFSSMBGetCIFSACL(const int xid, struct cifsTconInfo *tcon, __u16 fid,
> __u32 parm_len;
> __u32 acl_len;
> struct smb_com_ntransact_rsp *pSMBr;
> - char *pdata;
> + char *pdata = NULL;
This looks like a compiler problem - the variable is always
initialized by validate_ntransact except when
buf (which contains the smb) is null, when it returns -EINVAL and in
that case pdata is not used.
Setting it to null would not help anyway - if it were left as null it
would oops on the memcpy (where pdata is used).
This area of code has not changed recently.
--
Thanks,
Steve
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] FS: cifs: Fix compile warning
@ 2010-09-13 16:30 ` Steve French
0 siblings, 0 replies; 4+ messages in thread
From: Steve French @ 2010-09-13 16:30 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: Steve French, Jeff Layton, Suresh Jayaraman, Shirish Pargaonkar,
linux-cifs, samba-technical, linux-kernel
On Fri, Sep 10, 2010 at 7:45 PM, Javier Martinez Canillas
<martinez.javier@gmail.com> wrote:
> In today linux-next I got a compile warning due a possibly uninitialized variable
>
> This trivial patch solves the issue
>
> Thanks a lot
>
> Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
> ---
> fs/cifs/cifssmb.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
> index c65c341..ee1bba4 100644
> --- a/fs/cifs/cifssmb.c
> +++ b/fs/cifs/cifssmb.c
> @@ -3079,7 +3079,7 @@ CIFSSMBGetCIFSACL(const int xid, struct cifsTconInfo *tcon, __u16 fid,
> __u32 parm_len;
> __u32 acl_len;
> struct smb_com_ntransact_rsp *pSMBr;
> - char *pdata;
> + char *pdata = NULL;
This looks like a compiler problem - the variable is always
initialized by validate_ntransact except when
buf (which contains the smb) is null, when it returns -EINVAL and in
that case pdata is not used.
Setting it to null would not help anyway - if it were left as null it
would oops on the memcpy (where pdata is used).
This area of code has not changed recently.
--
Thanks,
Steve
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-09-13 16:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-11 0:45 [PATCH] FS: cifs: Fix compile warning Javier Martinez Canillas
2010-09-11 0:45 ` Javier Martinez Canillas
2010-09-13 16:30 ` Steve French
2010-09-13 16:30 ` Steve French
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.