]> git.ipfire.org Git - thirdparty/snapper.git/commit
Fix data corruption leading to kernel panic. 470/head
authorDaniel Dawson <danielcdawson@gmail.com>
Wed, 9 Jan 2019 04:27:35 +0000 (20:27 -0800)
committerGitHub <noreply@github.com>
Wed, 9 Jan 2019 04:27:35 +0000 (20:27 -0800)
commitb4162d68eacdfdf3dd6d4c13e19e189c6fa0c70a
tree0b4dcce0ed102926e2a875e7be32079e5c307be0
parent96eb3673a3983449a17c847e4e3a7a72df00f95d
Fix data corruption leading to kernel panic.

I found that trying to use Snapper to create a Btrfs snapshot with a qgroup set causes the system to lock up, sometimes with a kernel panic message on the console. I tracked down the problem to this code. As it currently stands, `buffer` goes out of scope before the `ioctl` call can use it, and in my case, at least, it seems some of the data is already overwritten. Moving it out of the `if` statement lets this work properly.
snapper/BtrfsUtils.cc