Re: [PATCH] sunrpc: Fix trace events to store data in the struct

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

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




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]