mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* 2.5.73: eth1394.c: ptask might be used uninitialized
@ 2003-06-24 17:22 Adrian Bunk
  2003-06-24 17:49 ` Steve Kinneberg
  0 siblings, 1 reply; 2+ messages in thread
From: Adrian Bunk @ 2003-06-24 17:22 UTC (permalink / raw)
  To: bcollins, linux1394-devel; +Cc: linux-kernel

In 2.5.73, gcc complains as follows:

<--  snip  -->

...
  CC      drivers/ieee1394/eth1394.o
...
drivers/ieee1394/eth1394.c:1424: warning: `ptask' might be used 
uninitialized in this function
...

<--  snip  -->

It seems something like the patch below might be needed (I didn't check 
for 100% correctness, but it shows what might be needed to fix it).

cu
Adrian

--- linux-2.5.73-not-full/drivers/ieee1394/eth1394.c.old	2003-06-23 23:11:01.000000000 +0200
+++ linux-2.5.73-not-full/drivers/ieee1394/eth1394.c	2003-06-23 23:11:25.000000000 +0200
@@ -1427,7 +1427,7 @@
 	if (skb_is_nonlinear(skb)) {
 		ret = skb_linearize(skb, kmflags);
 		if(ret)
-			goto fail;
+			goto out;
 	}
 
 	ptask = kmem_cache_alloc(packet_task_cache, kmflags);
@@ -1555,6 +1555,7 @@
 		ether1394_free_packet(ptask->packet);
 	if(ptask)
 		kmem_cache_free(packet_task_cache, ptask);
+out:
 	if(skb != NULL) {
 		dev_kfree_skb(skb);
 	}

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: 2.5.73: eth1394.c: ptask might be used uninitialized
  2003-06-24 17:22 2.5.73: eth1394.c: ptask might be used uninitialized Adrian Bunk
@ 2003-06-24 17:49 ` Steve Kinneberg
  0 siblings, 0 replies; 2+ messages in thread
From: Steve Kinneberg @ 2003-06-24 17:49 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: Ben Collins, Linux1394dev, linux-kernel

I believe this has been fixed in Linux1394 project's SVN revision 957. 
Hopefully, it'll be merged with the main kernel in the near future.

On Tue, 2003-06-24 at 10:22, Adrian Bunk wrote:
> In 2.5.73, gcc complains as follows:
> 
> <--  snip  -->
> 
> ...
>   CC      drivers/ieee1394/eth1394.o
> ...
> drivers/ieee1394/eth1394.c:1424: warning: `ptask' might be used 
> uninitialized in this function
> ...
> 
> <--  snip  -->
> 
> It seems something like the patch below might be needed (I didn't check 
> for 100% correctness, but it shows what might be needed to fix it).
> 
> cu
> Adrian
> 
> --- linux-2.5.73-not-full/drivers/ieee1394/eth1394.c.old	2003-06-23 23:11:01.000000000 +0200
> +++ linux-2.5.73-not-full/drivers/ieee1394/eth1394.c	2003-06-23 23:11:25.000000000 +0200
> @@ -1427,7 +1427,7 @@
>  	if (skb_is_nonlinear(skb)) {
>  		ret = skb_linearize(skb, kmflags);
>  		if(ret)
> -			goto fail;
> +			goto out;
>  	}
>  
>  	ptask = kmem_cache_alloc(packet_task_cache, kmflags);
> @@ -1555,6 +1555,7 @@
>  		ether1394_free_packet(ptask->packet);
>  	if(ptask)
>  		kmem_cache_free(packet_task_cache, ptask);
> +out:
>  	if(skb != NULL) {
>  		dev_kfree_skb(skb);
>  	}
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: INetU
> Attention Web Developers & Consultants: Become An INetU Hosting Partner.
> Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
> INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
> _______________________________________________
> mailing list linux1394-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux1394-devel
-- 
Steve Kinneberg
ACM Systems
3034 Gold Canal Drive
Rancho Cordova, CA  95670
Phone: (916) 463-7987
Email: kinnebergsteve at acmsystems dot com


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-06-24 17:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-24 17:22 2.5.73: eth1394.c: ptask might be used uninitialized Adrian Bunk
2003-06-24 17:49 ` Steve Kinneberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®