commit | ae5c461cb99272449e9ce915bea9844c1cf0bc45 | [log] [tgz] |
---|---|---|
author | Lukas Czerner <lczerner@redhat.com> | Mon Oct 22 18:01:19 2012 -0400 |
committer | chrmhoffmann <chrmhoffmann@gmail.com> | Sun Apr 05 10:16:35 2020 +0200 |
tree | efbb8c090a7a0717f5fb03253642d90ef4cab245 | |
parent | 4395f991f43d78261218dfc8586611f9fd54f03b [diff] |
ext4: Avoid underflow in ext4_trim_fs() commit 5de35e8d5c02d271c20e18337e01bc20e6ef472e upstream. Currently if len argument in ext4_trim_fs() is smaller than one block, the 'end' variable underflow. Avoid that by returning EINVAL if len is smaller than file system block. Also remove useless unlikely(). Signed-off-by: Lukas Czerner <lczerner@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>