]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
btrfs: use kvzalloc() to allocate clone_roots in btrfs_ioctl_send()
authorDenis Efremov <efremov@linux.com>
Mon, 21 Sep 2020 17:03:35 +0000 (20:03 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Nov 2020 10:08:48 +0000 (11:08 +0100)
commit96e4fc79e90d34bfafad353c77e873a1da7a3776
treedfc2b6db24c4a48e5cce24e0abd44c2808b826b0
parent67dc9c4f0af7a04548dbba8606bee75d20627ea0
btrfs: use kvzalloc() to allocate clone_roots in btrfs_ioctl_send()

commit 8eb2fd00153a3a96a19c62ac9c6d48c2efebe5e8 upstream.

btrfs_ioctl_send() used open-coded kvzalloc implementation earlier.
The code was accidentally replaced with kzalloc() call [1]. Restore
the original code by using kvzalloc() to allocate sctx->clone_roots.

[1] https://patchwork.kernel.org/patch/9757891/#20529627

Fixes: 818e010bf9d0 ("btrfs: replace opencoded kvzalloc with the helper")
CC: stable@vger.kernel.org # 4.14+
Signed-off-by: Denis Efremov <efremov@linux.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/send.c