There is otherwise a risk of a possible null pointer dereference.
Was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <redacted>
---
net/sunrpc/auth.c | 10 +++++++---
1 fil ändrad, 7 tillägg(+), 3 borttagningar(-)
On Thu, May 15, 2014 at 5:56 PM, Rickard Strandqvist
[off-list ref] wrote:
quoted hunk
There is otherwise a risk of a possible null pointer dereference.
Was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <redacted>
---
net/sunrpc/auth.c | 10 +++++++---
1 fil ändrad, 7 tillägg(+), 3 borttagningar(-)
Can you please explain how we can get to rpcauth_invalcred() without a
valid cred pointer? I'm not seeing it...
Cheers
Trond
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi
I do not know, I'm not an expert on this code.
But since there before was a if (cred) someone must have thought this
could happen.
Best regards
Rickard Strandqvist
2014-05-16 0:07 GMT+02:00 Trond Myklebust [off-list ref]:
On Thu, May 15, 2014 at 5:56 PM, Rickard Strandqvist
[off-list ref] wrote:
quoted
There is otherwise a risk of a possible null pointer dereference.
Was largely found by using a static code analysis program called cppcheck.
Signed-off-by: Rickard Strandqvist <redacted>
---
net/sunrpc/auth.c | 10 +++++++---
1 fil ändrad, 7 tillägg(+), 3 borttagningar(-)
} and *else* should be on the same line, and there should be {} in the
*else* arm since there's {} in the *if* arm already, according to
Documentation/CodingStyle.
+ dprintk("RPC: %5u invalidating is NULL\n", task->tk_pid);
Hi
I have made a new patch according Sergei specification.
But there remains Tronds question though.
Best regards
Rickard Strandqvist
2014-05-16 14:19 GMT+02:00 Sergei Shtylyov [off-list ref]:
Hello.
On 16-05-2014 1:56, Rickard Strandqvist wrote:
quoted
There is otherwise a risk of a possible null pointer dereference.
quoted
Was largely found by using a static code analysis program called cppcheck.
} and *else* should be on the same line, and there should be {} in the
*else* arm since there's {} in the *if* arm already, according to
Documentation/CodingStyle.
quoted
+ dprintk("RPC: %5u invalidating is NULL\n", task->tk_pid);
On Sat, May 17, 2014 at 12:36 PM, Rickard Strandqvist
[off-list ref] wrote:
Hi
I have made a new patch according Sergei specification.
I'll be happy to apply this patch once someone explains to me why we
can't just remove that check for cred != NULL, however I'm not
applying a patch purely in order to silence a warning from cppcheck.
Cheers,
Trond
But there remains Tronds question though.
Best regards
Rickard Strandqvist
2014-05-16 14:19 GMT+02:00 Sergei Shtylyov [off-list ref]:
quoted
Hello.
On 16-05-2014 1:56, Rickard Strandqvist wrote:
quoted
There is otherwise a risk of a possible null pointer dereference.
quoted
Was largely found by using a static code analysis program called cppcheck.
} and *else* should be on the same line, and there should be {} in the
*else* arm since there's {} in the *if* arm already, according to
Documentation/CodingStyle.
quoted
+ dprintk("RPC: %5u invalidating is NULL\n", task->tk_pid);
That's not a proper English, I'm afraid.
quoted
}
WBR, Sergei
--
Trond Myklebust
Linux NFS client maintainer, PrimaryData
trond.myklebust-7I+n7zu2hftEKMMhf/gKZA@public.gmane.org
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html