From: Filipe Manana Date: Wed, 21 May 2014 16:38:13 +0000 (+0100) Subject: Btrfs: send, fix corrupted path strings for long paths X-Git-Tag: omap-for-v3.16/fixes-against-rc1~94^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01a9a8a9e20012f5676ec9cd16b6aed08b267066;p=pandora-kernel.git Btrfs: send, fix corrupted path strings for long paths If a path has more than 230 characters, we allocate a new buffer to use for the path, but we were forgotting to copy the contents of the previous buffer into the new one, which has random content from the kmalloc call. Test: mkfs.btrfs -f /dev/sdd mount /dev/sdd /mnt TEST_PATH="/mnt/fdmanana/.config/google-chrome-mysetup/Default/Pepper_Data/Shockwave_Flash/WritableRoot/#SharedObjects/JSHJ4ZKN/s.wsj.net/[[IMPORT]]/players.edgesuite.net/flash/plugins/osmf/advanced-streaming-plugin/v2.7/osmf1.6/Ak#" mkdir -p $TEST_PATH echo "hello world" > $TEST_PATH/amaiAdvancedStreamingPlugin.txt btrfs subvolume snapshot -r /mnt /mnt/mysnap1 btrfs send /mnt/mysnap1 -f /tmp/1.snap A test for xfstests follows. Signed-off-by: Filipe David Borba Manana Cc: Marc Merlin Tested-by: Marc MERLIN Signed-off-by: Chris Mason --- Reading git-diff-tree failed