* [Patch] Remove unnecessary check in net/sunrpc/svcsock.c
@ 2006-09-27 15:34 Eric Sesterhenn
2006-09-28 21:37 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Eric Sesterhenn @ 2006-09-27 15:34 UTC (permalink / raw)
To: netdev
hi,
coverity spotted this one as possible dereference in the dprintk(),
but since there is only one caller of svc_create_socket(), which always
passes a valid sin, we dont need this check.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
--- linux-2.6.18-git7/net/sunrpc/svcsock.c.orig 2006-09-27 16:06:53.000000000 +0200
+++ linux-2.6.18-git7/net/sunrpc/svcsock.c 2006-09-27 16:07:09.000000000 +0200
@@ -1393,14 +1393,12 @@ svc_create_socket(struct svc_serv *serv,
if ((error = sock_create_kern(PF_INET, type, protocol, &sock)) < 0)
return error;
- if (sin != NULL) {
- if (type == SOCK_STREAM)
- sock->sk->sk_reuse = 1; /* allow address reuse */
- error = kernel_bind(sock, (struct sockaddr *) sin,
- sizeof(*sin));
- if (error < 0)
- goto bummer;
- }
+ if (type == SOCK_STREAM)
+ sock->sk->sk_reuse = 1; /* allow address reuse */
+ error = kernel_bind(sock, (struct sockaddr *) sin,
+ sizeof(*sin));
+ if (error < 0)
+ goto bummer;
if (protocol == IPPROTO_TCP) {
if ((error = kernel_listen(sock, 64)) < 0)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Patch] Remove unnecessary check in net/sunrpc/svcsock.c
2006-09-27 15:34 [Patch] Remove unnecessary check in net/sunrpc/svcsock.c Eric Sesterhenn
@ 2006-09-28 21:37 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2006-09-28 21:37 UTC (permalink / raw)
To: snakebyte; +Cc: netdev
From: Eric Sesterhenn <snakebyte@gmx.de>
Date: Wed, 27 Sep 2006 17:34:49 +0200
> coverity spotted this one as possible dereference in the dprintk(),
> but since there is only one caller of svc_create_socket(), which always
> passes a valid sin, we dont need this check.
>
> Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Applied, thanks Eric.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-09-28 21:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-27 15:34 [Patch] Remove unnecessary check in net/sunrpc/svcsock.c Eric Sesterhenn
2006-09-28 21:37 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).