✓ CI.checkpatch: success for drm/xe/debugfs: fixed the return value of wedged_mode_set
Patchwork
patchwork at emeril.freedesktop.org
Fri Feb 14 00:24:23 UTC 2025
== Series Details ==
Series: drm/xe/debugfs: fixed the return value of wedged_mode_set
URL : https://patchwork.freedesktop.org/series/144831/
State : success
== Summary ==
+ KERNEL=/kernel
+ git clone https://gitlab.freedesktop.org/drm/maintainer-tools mt
Cloning into 'mt'...
warning: redirecting to https://gitlab.freedesktop.org/drm/maintainer-tools.git/
+ git -C mt rev-list -n1 origin/master
22f9cda3436b4fe965b5c5f31d2f2c1bcb483189
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit 46abcd9006f1a059ea328c392fb5f4f4a9395a50
Author: Xin Wang <x.wang at intel.com>
Date: Fri Feb 14 06:36:15 2025 +0800
drm/xe/debugfs: fixed the return value of wedged_mode_set
It is generally expected that the write() function should return a
positive value indicating the number of bytes written or a negative
error code if an error occurs. Returning 0 is unusual and can lead
to unexpected behavior.
When the user program writes the same value to wedged_mode twice in
a row, a lockup will occur, because the value expected to be
returned by the write() function inside the program should be equal
to the actual written value instead of 0.
To reproduce the issue:
echo 1 > /sys/kernel/debug/dri/0/wedged_mode
echo 1 > /sys/kernel/debug/dri/0/wedged_mode <- lockup here
Signed-off-by: Xin Wang <x.wang at intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
Cc: Fei Yang <fei.yang at intel.com>
Cc: Shuicheng Lin <shuicheng.lin at intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
+ /mt/dim checkpatch 5a69acbd85ccb74b6f1ff124806bbd9d2c9cfa1a drm-intel
46abcd9006f1 drm/xe/debugfs: fixed the return value of wedged_mode_set
More information about the Intel-xe
mailing list