From: Jason Wang Date: Wed, 2 May 2012 03:42:06 +0000 (+0800) Subject: macvtap: zerocopy: set SKBTX_DEV_ZEROCOPY only when skb is built successfully X-Git-Tag: v3.5-rc1~109^2~146^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01d6657b388438def19c8baaea28e742b6ed32ec;p=pandora-kernel.git macvtap: zerocopy: set SKBTX_DEV_ZEROCOPY only when skb is built successfully Current the SKBTX_DEV_ZEROCOPY is set unconditionally after zerocopy_sg_from_iovec(), this would lead NULL pointer when macvtap fails to build zerocopy skb because destructor_arg was not initialized. Solve this by set this flag after the skb were built successfully. Signed-off-by: Jason Wang Signed-off-by: Michael S. Tsirkin --- Reading git-diff-tree failed