Chris Wilson
6971e07b6b
drm/i915/gt: Cleanup kasan warning for on-stack (unsigned long) casting
Kasan is gving a warning for passing a u32 parameter into find_first_bit
(casting to a unsigned long *, with appropriate length restrictions):
[ 44.678262] BUG: KASAN: stack-out-of-bounds in find_first_bit+0x2e/0x50
[ 44.678295] Read of size 8 at addr ffff888233f4fc30 by task core_hotunplug/474
[ 44.678326]
[ 44.678358] CPU: 0 PID: 474 Comm: core_hotunplug Not tainted 5.9.0+ #608
[ 44.678465] Hardware name: BESSTAR (HK) LIMITED GN41/Default string, BIOS BLT-BI-MINIPC-F4G-EX3R110-GA65A-101-D 10/12/2018
[ 44.678500] Call Trace:
[ 44.678534] dump_stack+0x84/0xba
[ 44.678569] print_address_description.constprop.0+0x21/0x220
[ 44.678605] ? kmsg_dump_rewind_nolock+0x5f/0x5f
[ 44.678638] ? _raw_spin_lock_irqsave+0x6d/0xb0
[ 44.678669] ? _raw_write_lock_irqsave+0xb0/0xb0
[ 44.678702] ? set_task_cpu+0x1e0/0x1e0
[ 44.678733] ? find_first_bit+0x2e/0x50
[ 44.678763] kasan_report.cold+0x20/0x42
[ 44.678794] ? find_first_bit+0x2e/0x50
[ 44.678825] __asan_load8+0x69/0x90
[ 44.678856] find_first_bit+0x2e/0x50
[ 44.679027] __caps_show.isra.0+0x9e/0x1f0 [i915]
Since we are only using the shorter type for our own convenience,
accommodate kasan and use unsigned long.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201013110845.16127-1-chris@chris-wilson.co.uk
2020-10-16 11:08:44 +01:00
..
2020-08-06 14:56:11 -07:00
2020-08-15 08:18:22 -07:00
2020-07-29 17:05:44 +02:00
2020-08-05 20:13:21 -07:00
2020-08-06 18:09:34 -07:00
2020-08-07 13:13:09 -07:00
2020-08-02 18:26:51 +03:00
2020-08-15 20:36:42 -07:00
2020-07-31 15:11:52 -07:00
2020-08-06 10:54:07 -07:00
2020-08-11 11:58:31 +10:00
2020-08-15 08:18:22 -07:00
2020-08-20 10:58:13 -07:00
2020-08-11 17:29:45 +02:00
2020-08-07 10:33:50 -07:00
2020-08-11 14:34:17 -07:00
2020-08-11 10:59:19 -07:00
2020-07-30 17:22:58 +09:00
2020-08-07 21:14:30 -07:00
2020-08-10 19:07:44 -07:00
2020-08-18 15:40:30 +02:00
2020-08-20 11:18:58 +02:00
2020-07-27 11:49:37 +02:00
2020-08-05 12:56:27 -07:00
2020-10-16 11:08:44 +01:00
2020-07-29 16:58:08 +02:00
2020-08-10 16:33:54 -07:00
2020-08-14 13:31:25 -07:00
2020-08-14 16:00:09 -07:00
2020-08-15 08:18:22 -07:00
2020-08-04 13:49:43 -07:00
2020-08-20 08:35:19 -03:00
2020-08-15 18:50:32 -07:00
2020-08-05 11:43:47 -07:00
2020-08-14 16:27:00 +02:00
2020-08-04 18:11:58 -07:00
2020-07-24 16:36:13 -07:00
2020-08-05 19:24:27 -07:00
2020-08-07 10:33:50 -07:00
2020-08-14 19:56:57 -07:00
2020-08-15 20:36:42 -07:00
2020-08-11 14:13:24 -07:00
2020-08-11 14:13:24 -07:00
2020-08-05 13:23:24 -07:00
2020-08-15 08:09:38 -07:00
2020-08-07 21:14:30 -07:00
2020-08-06 11:55:43 -07:00
2020-07-31 14:38:12 +02:00
2020-08-10 18:20:04 -07:00
2020-08-23 10:52:33 -07:00
2020-08-14 19:56:57 -07:00
2020-08-14 19:56:56 -07:00
2020-08-05 11:12:34 -07:00
2020-07-29 17:12:09 +02:00
2020-08-19 16:30:57 -06:00
2020-08-20 11:30:22 +05:30
2020-08-12 12:41:15 -07:00
2020-08-22 10:12:49 -07:00
2020-08-07 13:35:51 -07:00
2020-08-09 12:52:28 -07:00
2020-08-12 12:13:44 -07:00
2020-08-07 21:27:37 -07:00
2020-08-06 11:55:43 -07:00
2020-08-19 16:23:22 -07:00
2020-08-14 16:00:09 -07:00
2020-08-12 10:58:01 -07:00
2020-07-30 23:27:08 +01:00
2020-08-11 11:17:45 -07:00
2020-07-27 14:24:51 +02:00
2020-08-12 17:17:00 -07:00
2020-08-22 10:12:49 -07:00
2020-08-17 22:43:55 -04:00
2020-08-14 19:56:57 -07:00
2020-08-07 21:14:30 -07:00
2020-08-18 14:27:12 -07:00
2020-08-05 20:13:21 -07:00
2020-08-07 18:48:15 -07:00
2020-08-14 16:01:59 -07:00
2020-08-15 08:09:38 -07:00
2020-08-09 11:06:10 -07:00
2020-08-06 14:56:11 -07:00
2020-08-07 13:00:53 -07:00
2020-08-11 14:34:17 -07:00
2020-08-17 11:09:13 -06:00
2020-08-11 14:34:17 -07:00
2020-08-28 12:38:06 +10:00
2020-08-19 06:43:28 +02:00
2020-08-12 12:13:44 -07:00
2020-08-14 13:34:37 -07:00