summaryrefslogtreecommitdiff
path: root/drivers/peci
diff options
context:
space:
mode:
authorZhen Lei <thunder.leizhen@huawei.com>2023-05-27 15:34:35 +0300
committerAndrew Morton <akpm@linux-foundation.org>2023-06-10 03:44:23 +0300
commit6f22a744f4ee7a22be4704cf93bbe22decc7e79e (patch)
tree0143ce59beda6527771a1b35113144fc7135d0ad /drivers/peci
parent1cba6c4309f03de570202c46f03df3f73a0d4c82 (diff)
downloadlinux-6f22a744f4ee7a22be4704cf93bbe22decc7e79e.tar.xz
kexec: delete a useless check in crash_shrink_memory()
The check '(crashk_res.parent != NULL)' is added by commit e05bd3367bd3 ("kexec: fix Oops in crash_shrink_memory()"), but it's stale now. Because if 'crashk_res' is not reserved, it will be zero in size and will be intercepted by the above 'if (new_size >= old_size)'. Ago: if (new_size >= end - start + 1) Now: old_size = (end == 0) ? 0 : end - start + 1; if (new_size >= old_size) Link: https://lkml.kernel.org/r/20230527123439.772-3-thunder.leizhen@huawei.com Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com> Cc: Baoquan He <bhe@redhat.com> Cc: Cong Wang <amwang@redhat.com> Cc: Eric W. Biederman <ebiederm@xmission.com> Cc: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'drivers/peci')
0 files changed, 0 insertions, 0 deletions