From: Cyrill Gorcunov Date: Thu, 29 Oct 2009 09:59:18 +0000 (-0700) Subject: net,socket: introduce DECLARE_SOCKADDR helper to catch overflow at build time X-Git-Tag: v2.6.33-rc1~388^2~598 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38bfd8f5bec496e8e0db8849e01c99a33479418a;p=pandora-kernel.git net,socket: introduce DECLARE_SOCKADDR helper to catch overflow at build time proto_ops->getname implies copying protocol specific data into storage unit (particulary to __kernel_sockaddr_storage). So when we implement new protocol support we should keep such a detail in mind (which is easy to forget about). Lets introduce DECLARE_SOCKADDR helper which check if storage unit is not overfowed at build time. Eventually inet_getname is switched to use DECLARE_SOCKADDR (to show example of usage). Signed-off-by: Cyrill Gorcunov Signed-off-by: David S. Miller --- Reading git-diff-tree failed