It looks like netlink_recvmsg() has recvfrom return sematics - when userspace buffer is too small the return value is the number of octets actually copied, not the number which _would_ be copied, if there was enough space.
This makes using MSG_PEEK to ensure that the buffer is large enough buggy. I think the last line should be return err ? : len; and rely on sys_recvfrom to fix up the return value if recvfrom was actually called. Please tell me if I'm on crack; otherwise I'll do a patch. (but my userpace code is going to have to work around this anyway.) Cheers, Simon. - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html