From: David Teigland Date: Wed, 4 Mar 2009 17:17:23 +0000 (-0600) Subject: dlm: fix length calculation in compat code X-Git-Tag: v2.6.30-rc1~649^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1fecb1c4b62881e3689ba2dcf93072ae301b597c;p=pandora-kernel.git dlm: fix length calculation in compat code Using offsetof() to calculate name length does not work because it does not produce consistent results with with structure packing. This caused memcpy to corrupt memory by copying 4 extra bytes off the end of the buffer on 64 bit kernels with 32 bit userspace (the only case where this 32/64 compat code is used). The fix is to calculate name length directly from the start instead of trying to derive it later using count and offsetof. Signed-off-by: David Teigland --- Reading git-diff-tree failed