[Intel-xe] ✗ CI.checkpatch: warning for drm/xe: timeout needs to be a signed value

Patchwork patchwork at emeril.freedesktop.org
Tue Sep 26 04:13:33 UTC 2023


== Series Details ==

Series: drm/xe: timeout needs to be a signed value
URL   : https://patchwork.freedesktop.org/series/124236/
State : warning

== 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
63c2b6b160bca2df6efc7bc4cea6f442097d7854
+ cd /kernel
+ git config --global --add safe.directory /kernel
+ git log -n1
commit a02348754cfbc07a3cb98f00d84815d2037268b2
Author: Fei Yang <fei.yang at intel.com>
Date:   Mon Sep 25 21:12:59 2023 -0700

    drm/xe: timeout needs to be a signed value
    
    In xe_wait_user_fence_ioctl, the timeout is currently defined as
    unsigned long. That could potentially pass a negative value to
    the schedule_timeout() call because nsecs_to_jiffies() returns an
    unsigned long which gets used as signed long.
    
    [ 187.732238] schedule_timeout: wrong timeout value fffffffffffffc18
    [ 187.733180] CPU: 0 PID: 792 Comm: test_thread_dim Tainted: G U 6.4.0-xe #1
    [ 187.735019] Call Trace:
    [ 187.735373] <TASK>
    [ 187.735687] dump_stack_lvl+0x92/0xb0
    [ 187.736193] schedule_timeout+0x348/0x430
    [ 187.736739] ? __might_fault+0x67/0xd0
    [ 187.737255] ? check_chain_key+0x224/0x2d0
    [ 187.737812] ? __pfx_schedule_timeout+0x10/0x10
    [ 187.738429] ? __might_fault+0x6b/0xd0
    [ 187.738946] ? __pfx_lock_release+0x10/0x10
    [ 187.739512] ? __pfx_lock_release+0x10/0x10
    [ 187.740080] wait_woken+0x86/0x100
    [ 187.740556] xe_wait_user_fence_ioctl+0x34b/0xe00 [xe]
    [ 187.741281] ? __pfx_xe_wait_user_fence_ioctl+0x10/0x10 [xe]
    [ 187.742075] ? lock_acquire+0x169/0x3d0
    [ 187.742601] ? check_chain_key+0x224/0x2d0
    [ 187.743158] ? drm_dev_enter+0x9/0xe0 [drm]
    [ 187.743740] ? __pfx_woken_wake_function+0x10/0x10
    [ 187.744388] ? drm_dev_exit+0x11/0x50 [drm]
    [ 187.744969] ? __pfx_lock_release+0x10/0x10
    [ 187.745536] ? __might_fault+0x67/0xd0
    [ 187.746052] ? check_chain_key+0x224/0x2d0
    [ 187.746610] drm_ioctl_kernel+0x172/0x250 [drm]
    [ 187.747242] ? __pfx_xe_wait_user_fence_ioctl+0x10/0x10 [xe]
    [ 187.748037] ? __pfx_drm_ioctl_kernel+0x10/0x10 [drm]
    [ 187.748729] ? __pfx_xe_wait_user_fence_ioctl+0x10/0x10 [xe]
    [ 187.749524] ? __pfx_xe_wait_user_fence_ioctl+0x10/0x10 [xe]
    [ 187.750319] drm_ioctl+0x35e/0x620 [drm]
    [ 187.750871] ? __pfx_drm_ioctl+0x10/0x10 [drm]
    [ 187.751495] ? restore_fpregs_from_fpstate+0x99/0x140
    [ 187.752172] ? __pfx_restore_fpregs_from_fpstate+0x10/0x10
    [ 187.752901] ? mark_held_locks+0x24/0x90
    [ 187.753438] __x64_sys_ioctl+0xb4/0xf0
    [ 187.753954] do_syscall_64+0x3f/0x90
    [ 187.754450] entry_SYSCALL_64_after_hwframe+0x72/0xdc
    [ 187.755127] RIP: 0033:0x7f4e6651aaff
    [ 187.755623] Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <41> 89 c0 3d 00 f0 ff ff 77 1f 48 8b 44 24 18 64 48 2b 04 25 28 00
    [ 187.757995] RSP: 002b:00007fff05f37a50 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
    [ 187.758995] RAX: ffffffffffffffda RBX: 000055eca47c8130 RCX: 00007f4e6651aaff
    [ 187.759935] RDX: 00007fff05f37b60 RSI: 00000000c050644b RDI: 0000000000000004
    [ 187.760874] RBP: 0000000000000017 R08: 0000000000000017 R09: 7fffffffffffffff
    [ 187.761814] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
    [ 187.762753] R13: 0000000000000000 R14: 0000000000000000 R15: 00007f4e65d19ce0
    [ 187.763694] </TASK>
    
    Fixes: 9f801f10c0d6 ("drm/xe: Use nanoseconds instead of jiffies in uapi for user fence")
    Signed-off-by: Fei Yang <fei.yang at intel.com>
    Reviewed-by: Andi Shyti <andi.shyti at linux.intel.com>
    Cc: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
+ /mt/dim checkpatch fc8ec3c56efa5c15b630ddc17c89100440fe03ef drm-intel
a02348754 drm/xe: timeout needs to be a signed value
-:60: WARNING:UNKNOWN_COMMIT_ID: Unknown commit id '9f801f10c0d6', maybe rebased or not pulled?
#60: 
Fixes: 9f801f10c0d6 ("drm/xe: Use nanoseconds instead of jiffies in uapi for user fence")

total: 0 errors, 1 warnings, 0 checks, 77 lines checked




More information about the Intel-xe mailing list