lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 27 Jul 2009 11:06:02 +0300
From:	"Rémi Denis-Courmont" 
	<remi.denis-courmont@...ia.com>
To:	ext Eric Dumazet <eric.dumazet@...il.com>
Cc:	Linux Netdev List <netdev@...r.kernel.org>,
	"David S. Miller" <davem@...emloft.net>
Subject: Re: net-next-2.6 phonet causes build error

On Monday 27 July 2009 10:03:06 ext Eric Dumazet wrote:
> Rémi Denis-Courmont a écrit :
> > On Sunday 26 July 2009 21:43:11 ext Oliver Hartkopp wrote:
> >> i got this build error from the latest net-next-2.6:
> >>
> >> net/phonet/pn_dev.c: In function ‘phonet_init_net’:
> >> net/phonet/pn_dev.c:221: error: implicit declaration of function
> >> ‘proc_net_fops_create’
> >> net/phonet/pn_dev.c: In function ‘phonet_exit_net’:
> >> net/phonet/pn_dev.c:242: error: implicit declaration of function
> >> ‘proc_net_remove’
> >
> > Oops. This makes me wonder why I did not get that one here on my test
> > builds???
>
> I also have this warning :
>
> net/phonet/pn_dev.c: In function `phonet_device_get':
> net/phonet/pn_dev.c:99: warning: 'dev' might be used uninitialized in this
> function

Right. This is indeed a bug - thanks. Either my gcc version is bad at that 
stuff or I have missing debug options :(

> What about following patch ?
>
> [PATCH] phonet: phonet_device_get() fix
>
> net/phonet/pn_dev.c: In function `phonet_device_get':
> net/phonet/pn_dev.c:99: warning: 'dev' might be used uninitialized in this
> function
>
> Signed-off-by: Eric Dumazet <eric.dumazet@...il.com>
Acked-by: Rémi Denis-Courmont <remi.denis-courmont@...ia.com>

> ---
>
> diff --git a/net/phonet/pn_dev.c b/net/phonet/pn_dev.c
> index b0d6ddd..c2b77a6 100644
> --- a/net/phonet/pn_dev.c
> +++ b/net/phonet/pn_dev.c
> @@ -96,7 +96,7 @@ struct net_device *phonet_device_get(struct net *net)
>  {
>  	struct phonet_device_list *pndevs = phonet_device_list(net);
>  	struct phonet_device *pnd;
> -	struct net_device *dev;
> +	struct net_device *dev = NULL;
>
>  	spin_lock_bh(&pndevs->lock);
>  	list_for_each_entry(pnd, &pndevs->list, list) {



-- 
Rémi Denis-Courmont
Nokia Devices R&D, Maemo Software, Helsinki

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ