* [PATCH] cifs: fix error handling when cifscreds key payload is an error
@ 2012-01-20 13:04 Jeff Layton
[not found] ` <1327064677-15896-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Jeff Layton @ 2012-01-20 13:04 UTC (permalink / raw)
To: smfrench-Re5JQEeQqe8AvxtiuMwx3w
Cc: dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA,
linux-cifs-u79uwXL29TY76Z2rM5mHXA
Reported-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@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 986709a..aa687c8 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -2125,7 +2125,7 @@ cifs_set_cifscreds(struct smb_vol *vol, struct cifs_ses *ses)
down_read(&key->sem);
upayload = key->payload.data;
if (IS_ERR_OR_NULL(upayload)) {
- rc = PTR_ERR(key);
+ rc = upayload ? PTR_ERR(upayload) : -EINVAL;
goto out_key_put;
}
--
1.7.7.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] cifs: fix error handling when cifscreds key payload is an error
[not found] ` <1327064677-15896-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2012-01-20 19:44 ` Steve French
[not found] ` <CAH2r5mtTtYzj5MJXc5pu3L+cKO1XKrrcx6=gr8W_874sYPzfnw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Steve French @ 2012-01-20 19:44 UTC (permalink / raw)
To: Jeff Layton
Cc: dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA,
linux-cifs-u79uwXL29TY76Z2rM5mHXA
Looks reasonable. Was this found by static code analysis?
On Fri, Jan 20, 2012 at 7:04 AM, Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> Reported-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@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 986709a..aa687c8 100644
> --- a/fs/cifs/connect.c
> +++ b/fs/cifs/connect.c
> @@ -2125,7 +2125,7 @@ cifs_set_cifscreds(struct smb_vol *vol, struct cifs_ses *ses)
> down_read(&key->sem);
> upayload = key->payload.data;
> if (IS_ERR_OR_NULL(upayload)) {
> - rc = PTR_ERR(key);
> + rc = upayload ? PTR_ERR(upayload) : -EINVAL;
> goto out_key_put;
> }
>
> --
> 1.7.7.5
>
--
Thanks,
Steve
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] cifs: fix error handling when cifscreds key payload is an error
[not found] ` <CAH2r5mtTtYzj5MJXc5pu3L+cKO1XKrrcx6=gr8W_874sYPzfnw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2012-01-25 7:32 ` Dan Carpenter
0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2012-01-25 7:32 UTC (permalink / raw)
To: Steve French; +Cc: Jeff Layton, linux-cifs-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 303 bytes --]
On Fri, Jan 20, 2012 at 01:44:07PM -0600, Steve French wrote:
> Looks reasonable. Was this found by static code analysis?
>
I saw this in reading the code for something else. But it should be
a static checker thing, definitely. I'm writing a check for that
now.
regards,
dan carpenter
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-01-25 7:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-20 13:04 [PATCH] cifs: fix error handling when cifscreds key payload is an error Jeff Layton
[not found] ` <1327064677-15896-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-01-20 19:44 ` Steve French
[not found] ` <CAH2r5mtTtYzj5MJXc5pu3L+cKO1XKrrcx6=gr8W_874sYPzfnw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-01-25 7:32 ` Dan Carpenter
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.