Return-Path: Date: Tue, 24 Feb 2015 11:07:18 -0500 From: Steven Rostedt To: David Ahern Cc: James Hogan , Jeff Layton , "J. Bruce Fields" , linux-kernel@vger.kernel.org, Trond Myklebust , Ingo Molnar , stable@vger.kernel.org Subject: Re: [PATCH] sunrpc: Fix trace events to store data in the struct Message-ID: <20150224110718.1404695c@gandalf.local.home> In-Reply-To: <54ECA0BD.8010004@gmail.com> References: <1424778476-28242-1-git-send-email-james.hogan@imgtec.com> <20150224090915.40d8c7ff@grimm.local.home> <54EC885B.6090905@imgtec.com> <20150224094848.36dc2c88@gandalf.local.home> <54ECA0BD.8010004@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: On Tue, 24 Feb 2015 09:03:09 -0700 David Ahern wrote: > On 2/24/15 7:48 AM, Steven Rostedt wrote: > > I assume that the %pISpc expects a "struct sockaddr" passed to it as > > that is what is typecast in the print. We might as well make the ss into > > that structure instead of a struct sockaddr_storage, as it looks like > > the storage one is much larger, and we only care about the sockaddr > > part. Let's not waste the ring buffer if we don't need to. > > Per lib/vsprintf.c, it expects either a sockaddr_in or sockaddr_in6: > > case 'S': { > const union { > struct sockaddr raw; > struct sockaddr_in v4; > struct sockaddr_in6 v6; > } *sa = ptr; > > sockaddr_in6 > sockaddr so ss should be declared accordingly. Agreed. Thanks for pointing that out. -- Steve