cifs: make sure we do not overflow the max EA buffer size
authorRonnie Sahlberg <lsahlber@redhat.com>
Thu, 13 Feb 2020 02:14:47 +0000 (12:14 +1000)
committerSteve French <stfrench@microsoft.com>
Fri, 14 Feb 2020 17:10:24 +0000 (11:10 -0600)
commit85db6b7ae65f33be4bb44f1c28261a3faa126437
tree8eeef4c0aaf7b1e1906872651569ce5aa52d524a
parent2c6251ad91afc2e3c671c904702e8d121d3d50c0
cifs: make sure we do not overflow the max EA buffer size

RHBZ: 1752437

Before we add a new EA we should check that this will not overflow
the maximum buffer we have available to read the EAs back.
Otherwise we can get into a situation where the EAs are so big that
we can not read them back to the client and thus we can not list EAs
anymore or delete them.

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
CC: Stable <stable@vger.kernel.org>
fs/cifs/smb2ops.c