]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
afs: Fix the afs.cell and afs.volume xattr handlers
authorDavid Howells <dhowells@redhat.com>
Wed, 1 May 2019 12:27:09 +0000 (13:27 +0100)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 05:29:37 +0000 (00:29 -0500)
commit3b6a8afbe4ccc405de862eaabb6d5a65346e320f
tree04bfd8b44f2746aa7a83848770edd162ae39157c
parent8004c323e30f48484eab9e3e4ceaf8624b781273
afs: Fix the afs.cell and afs.volume xattr handlers

BugLink: https://bugs.launchpad.net/bugs/1863019
[ Upstream commit c73aa4102f5b9f261a907c3b3df94cd2c478504d ]

Fix the ->get handlers for the afs.cell and afs.volume xattrs to pass the
source data size to memcpy() rather than target buffer size.

Overcopying the source data occasionally causes the kernel to oops.

Fixes: d3e3b7eac886 ("afs: Add metadata xattrs")
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
fs/afs/xattr.c