Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757873AbZJSWuC (ORCPT ); Mon, 19 Oct 2009 18:50:02 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755962AbZJSWuB (ORCPT ); Mon, 19 Oct 2009 18:50:01 -0400 Received: from cantor.suse.de ([195.135.220.2]:34208 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751877AbZJSWuA (ORCPT ); Mon, 19 Oct 2009 18:50:00 -0400 Date: Tue, 20 Oct 2009 00:50:03 +0200 (CEST) From: Jiri Kosina X-X-Sender: jkosina@wotan.suse.de To: Felipe Contreras Cc: linux-kernel@vger.kernel.org, Heiko Carstens Subject: Re: [PATCH 2/7] ipc: fix trivial warning In-Reply-To: <94a0d4530910190949y265426cbq4c32466a9fab8966@mail.gmail.com> Message-ID: References: <1255906474-25091-1-git-send-email-felipe.contreras@gmail.com> <1255906474-25091-3-git-send-email-felipe.contreras@gmail.com> <94a0d4530910190750j5674ef13m93198b68d305b188@mail.gmail.com> <94a0d4530910190815n4cf2c2ebmd288f6e7501b1ba5@mail.gmail.com> <94a0d4530910190949y265426cbq4c32466a9fab8966@mail.gmail.com> User-Agent: Alpine 2.00 (LSU 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1754 Lines: 42 On Mon, 19 Oct 2009, Felipe Contreras wrote: > > This statement of your makes me wonder why you have submitted the patch in > > the first place, as you are apparently not sure whether adding > > uninitialized_var() is a valid thing to do or not. [ ... ] > In any case, if the patch is not correct, then somebody should point > that out, which is what the patch review process is for. Alternatively > I could have sent an email asking what is happening here, but from my > point of view this patch serves exactly the same purpose, and has the > advantage that it might turn out to be correct. > > It's not as if I didn't do any homework while writing this patch. Sorry if it sounded to offensive, I have probably been a little bit too tired ysterday. > > The gcc warning in this case is actually bogus, as msqid64 is touched only > > iff cmd == IPC_SET, and in such case, copy_msqid_from_user() initializes > > it properly. > > Yes, but it's used by ipcctl_pre_down, which from what I can see is > only using those arguments when cmd == IPC_SET, so everything is ok. > But still, I don't think the compiler _should_ know what > ipcctl_pre_down is going to do, if you look _only_ at msgctl_down, > then uninitialized_var is OK. Well at least older compilers were able to see this, only 4.4 seems to be warning here ... I have applied the patch for now, but I am really not fully convinced about it yet, we should probably report it to gcc folks anyway. Thanks, -- Jiri Kosina SUSE Labs, Novell Inc. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/