summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc/kvec
diff options
context:
space:
mode:
authorYuanZhe Liu <25031212351@stu.xidian.edu.cn>2026-10-29 15:33:11 +0800
committerRuben Wauters <rubenru09@aol.com>2026-11-12 04:46:13 +0000
commit431c2dffd2b7c1240a6e579f0c74104cd2e17329 (patch)
tree5286edfe976ccc127e3073f7e56d9336de4d5665 /rust/kernel/alloc/kvec
parented7fb901fce31588bd12ab95adc36ebcb51bc8ea (diff)
drm/gud: avoid divide error in gud_stats_debugfs
gud_stats_debugfs() computes the compression ratio by dividing the accumulated uncompressed length by stats_actual_length. That counter is zero until the first framebuffer flush has completed, so reading the stats debugfs file on a display which negotiates LZ4 compression raises a divide error before any frame has been sent. The wrap-around reset in gud_flush_rect() also clears the counter for a moment, which a concurrent read can observe. Copy the counter into a local variable and skip the ratio computation when it is zero. Fixes: 40e1a70b4aed ("drm: Add GUD USB Display driver") Cc: stable@vger.kernel.org Co-developed-by: Bin Yu <byu@xidian.edu.cn> Signed-off-by: Bin Yu <byu@xidian.edu.cn> Co-developed-by: Cheng Wen <wencheng@xidian.edu.cn> Signed-off-by: Cheng Wen <wencheng@xidian.edu.cn> Signed-off-by: YuanZhe Liu <25031212351@stu.xidian.edu.cn> Acked-by: Ruben Wauters <rubenru09@aol.com> Link: https://patch.msgid.link/20261029073311.14556-1-25031212351@stu.xidian.edu.cn Signed-off-by: Ruben Wauters <rubenru09@aol.com>
Diffstat (limited to 'rust/kernel/alloc/kvec')
0 files changed, 0 insertions, 0 deletions