Darrick J. Wong a7e9d977e0 ext4: don't fail GETFSUUID when the caller provides a long buffer
If userspace provides a longer UUID buffer than is required, we
shouldn't fail the call with EINVAL -- rather, we can fill the caller's
buffer with the bytes we /can/ fill, and update the length field to
reflect what we copied.  This doesn't break the UAPI since we're
enabling a case that currently fails, and so far Ted hasn't released a
version of e2fsprogs that uses the new ext4 ioctl.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Catherine Hoang <catherine.hoang@oracle.com>
Link: https://lore.kernel.org/r/166811139478.327006.13879198441587445544.stgit@magnolia
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
2022-12-08 21:49:24 -05:00
..
2022-07-02 18:52:21 +09:00
2022-10-06 17:13:18 -07:00
2022-11-03 11:12:48 -07:00
2022-10-04 13:38:03 -07:00
2022-10-10 20:13:22 -07:00
2022-05-09 16:21:45 -04:00
2022-10-10 19:45:17 -07:00
2022-08-03 10:35:43 -07:00
2022-10-07 08:19:26 -07:00
2022-09-24 07:00:00 +02:00
2022-11-01 15:05:03 -07:00
2022-10-10 19:45:17 -07:00
2022-10-10 19:45:17 -07:00
2022-05-09 16:21:46 -04:00
2022-10-10 19:45:17 -07:00
2022-09-11 20:26:07 -07:00
2022-10-06 17:36:48 -07:00
2022-08-11 13:11:49 -07:00
2022-09-24 07:00:00 +02:00
2022-08-20 11:34:33 -04:00
2022-10-10 19:45:17 -07:00
2022-10-29 17:49:33 -07:00
2022-06-29 13:07:16 +02:00
2022-10-06 16:49:00 -07:00
2022-04-01 19:35:56 -07:00
2022-10-10 14:21:11 -07:00
2022-08-03 10:35:43 -07:00
2022-10-10 19:45:17 -07:00
2022-10-06 17:13:18 -07:00
2022-06-28 13:58:05 -04:00
2022-05-22 21:03:01 +01:00