[bug report] drm/vmwgfx: Use new validation interface for the modesetting code v2

2018-10-11 Thread Dan Carpenter
() which presumably does the right thing. But the warning is correct that "handle" can be uninitialized here. 2607 if (out_fence) 2608 *out_fence = fence; 2609 else 2610 vmw_fence_obj_unreference(&f

[PATCH] drm/exynos: checking for NULL instead of IS_ERR()

2018-10-13 Thread Dan Carpenter
The of_drm_find_panel() function returns error pointers and never NULL but we the driver assumes that ->panel is NULL when it's not present. Fixes: 6afb7721e2a0 ("drm/exynos: move connector creation to attach callback") Signed-off-by: Dan Carpenter diff --git a/driv

[PATCH] drm/msm/gpu: Fix a couple memory leaks in debugfs

2018-10-13 Thread Dan Carpenter
The msm_gpu_open() function should free "show_priv" on error or it causes static checker warnings. Fixes: 4f776f4511c7 ("drm/msm/gpu: Convert the GPU show function to use the GPU state") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/msm/msm_debugfs.c | 15 +++

[radeon-alex:drm-next-4.21-wip 10/27] drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:1174 vcn_v1_0_stop_dpg_mode() error: uninitialized symbol 'ret_code'.

2018-10-16 Thread Dan Carpenter
tree: git://people.freedesktop.org/~agd5f/linux.git drm-next-4.21-wip head: 6af94a9d0e185f48bef5cc1372f3ada89d003858 commit: 15296db70619984157e60666da5da8994a66870e [10/27] drm/amdgpu/vcn:Add ring W/R PTR check for VCN DPG mode stop smatch warnings: drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c:1174

[bug report] drm/sun4i: Add HDMI support

2018-10-17 Thread Dan Carpenter
} 58 } 59 60 if (div && half) { 61 *div = best_m; 62 *half = is_double; ^^ This is either true or uninitialized. 63 } 64 65

Re: [PATCH 2/2] fbdev: sbuslib: integer overflow in sbusfb_ioctl_helper()

2018-10-17 Thread Dan Carpenter
On Mon, Oct 08, 2018 at 12:49:07PM +0200, Bartlomiej Zolnierkiewicz wrote: > > On 08/31/2018 10:09 AM, Dan Carpenter wrote: > > The "index + count" addition can overflow. Both come directly from the > > user. This bug leads to an information leak. > >

[radeon-alex:drm-next-4.21-wip 113/125] drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_abm.c:86 calculate_16_bit_backlight_from_pwm() warn: should 'bl_pwm << (1 + bl_int_count)' be a 64 bit type?

2018-10-31 Thread Dan Carpenter
tree: git://people.freedesktop.org/~agd5f/linux.git drm-next-4.21-wip head: 6830ffcb15a5bae3f031734b75b11a5f489a52bf commit: 6459eb8ee95150ffbdfcd0c9325945be80f98cf8 [113/125] drm/amd/display: Expand dc to use 16.16 bit backlight smatch warnings: drivers/gpu/drm/amd/amdgpu/../display/dc/dce/d

[PATCH] drm/nouveau/core: ERR_PTR vs NULL bug in nvkm_engine_info()

2018-05-30 Thread Dan Carpenter
The nvkm_engine_ref() function returns error pointers, not NULL on error. I fixed that but I also had to reverse some of the checks so it didn't become too convoluted. Fixes: c5c9127b25b2 ("drm/nouveau/device: implement a generic method to query device-specific properties") Sig

[bug report] drm/sun4i: backend: Check for the number of alpha planes

2018-05-31 Thread Dan Carpenter
plane->index); 492 493 layer_state->uses_frontend = true; 494 num_frontend_planes++; 495 } else { 496 layer_state->uses_frontend = false; 497 } regards, dan carpenter _

[PATCH] drm/i2c: tda998x: remove an unecessary check

2018-06-02 Thread Dan Carpenter
cec_read() returns a u8 so "val" can't be negative. If there is an error in cec_read() then it returns zero. Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c index 6ebd8842dbcc..86e3aee44686 100644 --- a/driv

Re: [PATCH][V2] drm/i915/guc: fix GEM_BUG_ON check

2018-06-12 Thread Dan Carpenter
t; @@ -206,7 +206,7 @@ void intel_guc_fini(struct intel_guc *guc) > static u32 get_log_control_flags(void) > { > u32 level = i915_modparams.guc_log_level; > - u32 flags = 0; > + s32 flags = 0; > > GEM_BUG_ON(level < 0); Only insane people use &quo

[bug report] drm/prime: replace NULL with error value in drm_prime_pages_to_sg

2018-06-14 Thread Dan Carpenter
prime_attach->sgt = sgt; 324 prime_attach->dir = dir; 325 } 326 } 327 328 return sgt; regards, dan carpenter ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [bug report] drm/prime: replace NULL with error value in drm_prime_pages_to_sg

2018-06-15 Thread Dan Carpenter
the replacement IS_ERR was one of items. > > > > IMHO it is still better to modify those two functions, > > drm_gem_cma_prime_get_sg_table and xen_drm_front_gem_get_sg_table. > > > > Thank you. > > Best regards YJ > > > > > > On Thu, 14 J

Re: [PATCH] drm/amdkfd: Integer overflows in ioctl

2018-04-25 Thread Dan Carpenter
mber of GPUs in the system. The > maximum number of GPUs supported due to device minor limit in DRM is 128. > 128 is sort of a magic number. Is there a MAX_GPU define or something? regards, dan carpenter ___ dri-devel mailing list dri-devel@

[radeon-alex:amd-mainline-dkms-4.15 1135/1759] drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1422 amdgpu_vm_bo_split_mapping() warn: if statement not indented

2018-04-25 Thread Dan Carpenter
tree: git://people.freedesktop.org/~agd5f/linux.git amd-mainline-dkms-4.15 head: 9556f93f18f7923978fb90f860c107fed9ca7f57 commit: c756d628b20a12f50c43df1cfbe24fd72b5a47b4 [1135/1759] drm/amd/amdgpu: adapt dgma to the new vam_mgr smatch warnings: drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1422 amd

[radeon-alex:amd-mainline-dkms-4.15 1231/1759] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:2183 fill_plane_attributes() warn: if statement not indented

2018-04-26 Thread Dan Carpenter
tree: git://people.freedesktop.org/~agd5f/linux.git amd-mainline-dkms-4.15 head: 9556f93f18f7923978fb90f860c107fed9ca7f57 commit: 265083076187e619aa9176aeb05ad630013429b4 [1231/1759] drm/amd/display: Hookup color management functions smatch warnings: drivers/gpu/drm/amd/amdgpu/../display/amdg

[radeon-alex:drm-next-4.18-wip 201/261] drivers/gpu/drm/amd/amdgpu/../powerplay/amd_powerplay.c:194 pp_late_init() error: we previously assumed 'hwmgr' could be null (see line 185)

2018-04-28 Thread Dan Carpenter
tree: git://people.freedesktop.org/~agd5f/linux.git drm-next-4.18-wip head: 92fb37464bd2b759d74f33c3b90a27575601745d commit: cb2bd409128cdf4b6ac7779e55876956271be9f3 [201/261] drm/amd/powerplay: add control gfxoff enabling in late init smatch warnings: drivers/gpu/drm/amd/amdgpu/../powerplay/

[radeon-alex:drm-next-4.18-wip 260/261] drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/smu7_hwmgr.c:1024 smu7_enable_sclk_mclk_dpm() warn: curly braces intended?

2018-04-28 Thread Dan Carpenter
tree: git://people.freedesktop.org/~agd5f/linux.git drm-next-4.18-wip head: 92fb37464bd2b759d74f33c3b90a27575601745d commit: c5eb46b78b52a40bc91421f667130fa7f328e97a [260/261] drm/amd/powerplay: add specific changes for VEGAM in smu7_hwmgr.c New smatch warnings: drivers/gpu/drm/amd/amdgpu/../

Re: [PATCH V1 3/5] backlight: qcom-wled: Add support for short circuit handling

2018-05-07 Thread Dan Carpenter
Hi Kiran, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on backlight/for-backlight-next] [also build test WARNING on v4.17-rc3 next-20180504] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://git

[PATCH 1/3] drm/xen-front: checking for NULL instead of IS_ERR

2018-05-08 Thread Dan Carpenter
drm_dev_alloc() returns error pointers, it never returns NULL. Fixes: c575b7eeb89f ("drm/xen-front: Add support for Xen PV display frontend") Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/xen/xen_drm_front.c b/drivers/gpu/drm/xen/xen_drm_front.c index 1b0ea9ac330e..86

[PATCH 2/3] drm/xen-front: fix xen_drm_front_shbuf_alloc() error handling

2018-05-08 Thread Dan Carpenter
The xen_drm_front_shbuf_alloc() function was returning a mix of error pointers and NULL and the the caller wasn't checking correctly. I've changed it to always return error pointer consistently. Fixes: c575b7eeb89f ("drm/xen-front: Add support for Xen PV display frontend"

[PATCH 3/3] drm/xen-front: Fix loop timeout

2018-05-08 Thread Dan Carpenter
If the loop times out then we want to exit with "to" set to zero, but in the current code it's set to -1. Fixes: c575b7eeb89f ("drm/xen-front: Add support for Xen PV display frontend") Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/xen/xen_drm_front

[PATCH] drm/dumb-buffers: Integer overflow in drm_mode_create_ioctl()

2018-05-09 Thread Dan Carpenter
se of how we picked args->width that means cpp < UINT_MAX / 4. Signed-off-by: Dan Carpenter --- Btw, DIV_ROUND_UP() integer overflows have been a recurring source of bugs so I have an unreleased static checker warning specific for that. This line triggers three warnings for me on my unr

[PATCH v2] drm/dumb-buffers: Integer overflow in drm_mode_create_ioctl()

2018-05-09 Thread Dan Carpenter
X / 8 and because of how we picked args->width that means cpp < UINT_MAX / 4. Signed-off-by: Dan Carpenter --- v2: correct a typo in the commit message diff --git a/drivers/gpu/drm/drm_dumb_buffers.c b/drivers/gpu/drm/drm_dumb_buffers.c index 39ac15ce4702..45b0b5bbb5f8 100644 --- a/driv

Re: [PATCH v2] drm/dumb-buffers: Integer overflow in drm_mode_create_ioctl()

2018-05-09 Thread Dan Carpenter
On Wed, May 09, 2018 at 09:18:57AM +0100, Chris Wilson wrote: > Quoting Dan Carpenter (2018-05-09 09:12:54) > > There is a comment here which says that DIV_ROUND_UP() can overflow and > > that's where the problem comes from. Say you pick: > > > >

[PATCH v2] drm/dumb-buffers: Integer overflow in drm_mode_create_ioctl()

2018-05-16 Thread Dan Carpenter
se of how we picked args->width that means cpp < UINT_MAX / 4. I've fixed it by preventing the integer overflow in DIV_ROUND_UP(). I removed the check for !cpp because it's not possible after this change. I also changed all the 0xU references to U32_MAX. Signed-off-by: Dan

Re: [PATCH v2] drm/dumb-buffers: Integer overflow in drm_mode_create_ioctl()

2018-05-16 Thread Dan Carpenter
On Wed, May 16, 2018 at 03:26:07PM +0100, Chris Wilson wrote: > Quoting Dan Carpenter (2018-05-16 15:00:26) > > There is a comment here which says that DIV_ROUND_UP() and that's where > > the problem comes from. Say you pick: > > > > args->bpp = UINT_M

Re: [PATCH v2] drm/dumb-buffers: Integer overflow in drm_mode_create_ioctl()

2018-05-16 Thread Dan Carpenter
On Wed, May 16, 2018 at 03:56:55PM +0100, Chris Wilson wrote: > Quoting Dan Carpenter (2018-05-16 15:52:57) > > On Wed, May 16, 2018 at 03:26:07PM +0100, Chris Wilson wrote: > > > Quoting Dan Carpenter (2018-05-16 15:00:26) > > > > There is a comment here which says

Re: [PATCH v2] drm/dumb-buffers: Integer overflow in drm_mode_create_ioctl()

2018-05-16 Thread Dan Carpenter
Btw, I've looked at this some more and I'm 99% sure there is no way to exploit it. The "if (PAGE_ALIGN(size) == 0)" prevents the integer overflow in __vgem_gem_create() that I was worried about. regards, dan carpenter ___ dri-de

[bug report] drm/exynos: Add driver for Exynos Scaler module

2018-05-17 Thread Dan Carpenter
ning '(-22)' drivers/gpu/drm/exynos/exynos_drm_scaler.c 399 400 static inline bool scaler_task_done(u32 val) 401 { 402 return val & SCALER_INT_STATUS_FRAME_END ? 0 : -EINVAL; ^^^ 403 } 404

[bug report] drm/amd/pp: Change voltage/clk range for OD feature on VI

2018-05-17 Thread Dan Carpenter
_vbios() error: uninitialized symbol 'max_vddc'. drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam_smumgr.c:1588 vegam_populate_clock_stretcher_data_table() error: uninitialized symbol 'efuse'. drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vegam

[PATCH] drm/exynos: fimc: signedness bug in fimc_setup_clocks()

2018-05-18 Thread Dan Carpenter
"id" needs to be signed for the error handling to work. Fixes: 7a2d5c77c558 ("drm/exynos: fimc: Convert driver to IPP v2 core API") Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimc.c b/drivers/gpu/drm/exynos/exynos_drm_fimc.c index 4dfbfc

[PATCH] drm/v3d: Checking for NULL vs IS_ERR()

2018-05-18 Thread Dan Carpenter
The v3d_fence_create() only returns error pointers on error. It never returns NULL. Fixes: 57692c94dcbe ("drm/v3d: Introduce a new DRM driver for Broadcom V3D V3.x+") Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/v3d/v3d_sched.c b/drivers/gpu/drm/v3d/v3d_sched.c index b0

Re: [PATCH 04/26] Staging: fbtft: flexfb: Switch to the gpio descriptor interface

2018-11-26 Thread Dan Carpenter
e checks as well in the same patch. Otherwise it breaks `git bisect`. (I don't know this code well. But it just feels like it has to be breaking git bisect just from from glancing at the patches. Perhaps I have misunderstood). regards, dan carpenter ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH 1/2] fbdev: sbuslib: use checked version of put_user()

2018-08-31 Thread Dan Carpenter
I'm not sure why the code assumes that only the first put_user() needs an access_ok() check. I have made all the put_user() and get_user() calls checked. Signed-off-by: Dan Carpenter diff --git a/drivers/video/fbdev/sbuslib.c b/drivers/video/fbdev/sbuslib.c index a436d44f1b7f..90c5133

[PATCH 2/2] fbdev: sbuslib: integer overflow in sbusfb_ioctl_helper()

2018-08-31 Thread Dan Carpenter
The "index + count" addition can overflow. Both come directly from the user. This bug leads to an information leak. Signed-off-by: Dan Carpenter --- Btw, commit 250c6c49e3b6 ("fbdev: Fixing arbitrary kernel leak in case FBIOGETCMAP_SPARC in sbusfb_ioctl_helper().") doesn&

Re: [PATCH v2] drm: Replace NULL with error value in drm_prime_pages_to_sg

2018-06-18 Thread Dan Carpenter
If dma_get_sgtable() fails then we return NULL. Fix that and it should be good. regards, dan carpenter ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] staging: android: ion: fix ion_dma_buf_attach signatur

2018-06-20 Thread Dan Carpenter
think we've applied this? Can't you just resend the original? > I missed this driver, sorry for the noise. Patch is not even compile > tested. > Please put that sort of information under the --- cut off because it doesn't really belong in the final git log. >

Re: [Intel-gfx] [PATCH v5 08/40] drm/i915: Initialize HDCP2.2 and its MEI interface

2018-06-28 Thread Dan Carpenter
[ The bot has a bug where it doesn't copy the error messages so I just guess what the issue is. - dan ] Hi Ramalingam, Thank you for the patch! Perhaps something to improve: url: https://github.com/0day-ci/linux/commits/Ramalingam-C/drm-i915-Implement-HDCP2-2/20180627-174219 base: git:/

Re: [PATCH v2 5/9] drm/nouveau: Use drm_connector_for_each_possible_encoder()

2018-06-30 Thread Dan Carpenter
Hi Ville, Thank you for the patch! Perhaps something to improve: url: https://github.com/0day-ci/linux/commits/Ville-Syrjala/drm-Third-attempt-at-fixing-the-fb-helper-best_encoder-mess/20180629-014202 base: git://people.freedesktop.org/~airlied/linux.git drm-next smatch warnings: drivers/g

[PATCH] video: fbdev: metronomefb: fix some off by one bugs

2018-07-03 Thread Dan Carpenter
The "mem" buffer has "size" bytes. The ">" should be ">=" to prevent reading one character beyond the end of the array. Signed-off-by: Dan Carpenter --- Not tested. diff --git a/drivers/video/fbdev/metronomefb.c b/drivers/video/fbdev/metronomefb.c

[PATCH] drm/vgem: off by one in vgem_gem_fault()

2018-07-03 Thread Dan Carpenter
If page_offset is == num_pages then we end up reading beyond the end of obj->pages[]. Fixes: af33a9190d02 ("drm/vgem: Enable dmabuf import interfaces") Signed-off-by: Dan Carpenter --- Static analysis. Not tested diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vg

[PATCH] drm/i810: off by one in i810_dma_vertex()

2018-07-03 Thread Dan Carpenter
If vertex->idx == dma->buf_count then we end up reading one element beyond the end of the dma->buflist[] array. Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/i810/i810_dma.c b/drivers/gpu/drm/i810/i810_dma.c index 576a417690d4..3b378936f575 100644 --- a/drivers/gpu

[PATCH] drm/panel: type promotion bug in s6e8aa0_read_mtp_id()

2018-07-04 Thread Dan Carpenter
The ARRAY_SIZE() macro is type size_t. If s6e8aa0_dcs_read() returns a negative error code, then "ret < ARRAY_SIZE(id)" is false because the negative error code is type promoted to a high positive value. Fixes: 02051ca06371 ("drm/panel: add S6E8AA0 driver") Signed-off-b

[PATCH] drm/virtio: fix bounds check in virtio_gpu_cmd_get_capset()

2018-07-04 Thread Dan Carpenter
ne element beyond the end of the vgdev->capsets[] array. Fixes: 62fb7a5e1096 ("virtio-gpu: add 3d/virgl support") Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c index 020070d483d3..4735bd1c7321 100644 --- a/drivers/gpu/d

[PATCH] drm/amd/display: off by one in find_irq_source_info()

2018-07-04 Thread Dan Carpenter
The ->info[] array has DAL_IRQ_SOURCES_NUMBER elements so this condition should be >= instead of > or we could read one element beyond the end of the array. Fixes: 4562236b3bc0 ("drm/amd/dc: Add dc display driver (v2)") Signed-off-by: Dan Carpenter diff --git a/drivers/gpu

[PATCH] drm/savage: off by one in savage_bci_cmdbuf()

2018-07-04 Thread Dan Carpenter
The > should be >= here so that we don't read beyond the end of the dma->buflist[] array. Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/savage/savage_state.c b/drivers/gpu/drm/savage/savage_state.c index 2db89bed52e8..7559a820bd43 100644 --- a/drivers/gpu/drm/savage/

[PATCH] drm/nouveau/hwmon: potential uninitialized variables

2018-07-11 Thread Dan Carpenter
Smatch complains that "value" can be uninitialized when kstrtol() returns -ERANGE. Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/nouveau/nouveau_hwmon.c b/drivers/gpu/drm/nouveau/nouveau_hwmon.c index 44178b4c3599..08a1ab6b150d 100644 --- a/drivers/gpu/drm/nouveau/nouve

[bug report] drm: Begin an API for in-kernel clients

2018-07-11 Thread Dan Carpenter
^^ Freed here 288 err_free: 289 kfree(buffer); ^^ Double free 290 291 return ERR_PTR(ret); 292 } 293 regards, dan carpenter ___ dri-devel mailing list dri

Re: [PATCH v2] drm: Replace NULL with error value in drm_prime_pages_to_sg

2018-07-12 Thread Dan Carpenter
On Thu, Jul 12, 2018 at 02:58:00PM +0300, Oleksandr Andrushchenko wrote: > On 06/18/2018 03:32 PM, Oleksandr Andrushchenko wrote: > > On 06/18/2018 03:29 PM, Dan Carpenter wrote: > > > On Mon, Jun 18, 2018 at 09:07:09AM +0300, Oleksandr Andrushchenko wrote: >

[radeon-alex:drm-next-4.21 64/142] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4942 amdgpu_dm_atomic_commit_tail() error: we previously assumed 'dc_state' could be null (see line 4927)

2018-12-10 Thread Dan Carpenter
tree: git://people.freedesktop.org/~agd5f/linux.git drm-next-4.21 head: 22666cc1481ae3814d9c7718418cc4a3aa7d90c3 commit: eb3dc8978596a045f469f13bb13271a707623ecb [64/142] drm/amd/display: Use private obj helpers for dm_atomic_state New smatch warnings: drivers/gpu/drm/amd/amdgpu/../display/am

[PATCH] drm/ati_pcigart: Fix error code in drm_ati_pcigart_init()

2018-12-16 Thread Dan Carpenter
failure. Signed-off-by: Dan Carpenter --- drivers/gpu/drm/ati_pcigart.c | 7 --- drivers/gpu/drm/r128/r128_cce.c | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/ati_pcigart.c b/drivers/gpu/drm/ati_pcigart.c index 6c4d4b6eba80..2362f07fe1fc 100644 --- a

[PATCH] drm: Fix an error pointer dereference()

2018-12-17 Thread Dan Carpenter
The drm_mode_create_tile_group() is only called from drm_parse_tiled_block() and the caller expects it to return a NULL on error. In other words, this function should match drm_mode_get_tile_group(). Signed-off-by: Dan Carpenter --- I sent a version of this patch last year which updated

Re: [PATCH 4.19 regression fix 1/2] staging: vboxvideo: Fix IRQs no longer working

2018-09-11 Thread Dan Carpenter
uninitialized variable warning. Just to spell it out a little more, the error code won't be printed for "if (ret)" because negatives are a subset of non-zero. Of course, if you do it consistently there won't be a warning message. I never see the consistent subsystems, so I don't know if they exist. regards, dan carpenter ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH 4.19 regression fix 1/2] staging: vboxvideo: Fix IRQs no longer working

2018-09-11 Thread Dan Carpenter
omeone then uses and unsigned type the error case would return as > success while the < 0 would be detected at compile time (or other static > code checkers). If the function returns int but ret is an unsigned int and we do "if (ret)", then ye

[PATCH] udmabuf: fix error code in map_udmabuf()

2018-09-14 Thread Dan Carpenter
We accidentally forgot to set "ret" on this error path so it means we return NULL instead of an error pointer. The caller checks for NULL and changes it to an error pointer so it doesn't cause an issue at run time. Signed-off-by: Dan Carpenter diff --git a/drivers/dma-buf/udma

[radeon-alex:amd-staging-drm-next-pco 299/339] drivers/gpu/drm/amd/amdgpu/gfxhub_v1_1.c:49 gfxhub_v1_1_get_xgmi_info() warn: should '(((amdgpu_mm_rreg(adev, (adev->reg_offset[1][0][0] + 2424), 0)) & 6

2018-09-14 Thread Dan Carpenter
tree: git://people.freedesktop.org/~agd5f/linux.git amd-staging-drm-next-pco head: bbab57a341c90ed6e32de8edf4e89dc5c55cddac commit: 5c777a51926dd6bbbf82dc5bddd980a408f0f618 [299/339] drm/amdgpu/gmc9: Adjust GART and AGP location with xgmi offset smatch warnings: drivers/gpu/drm/amd/amdgpu/gfx

Re: [PATCH 1/6] drm/dp_mst: Introduce drm_dp_mst_connector_atomic_check()

2018-09-20 Thread Dan Carpenter
Hi Lyude, Thank you for the patch! Perhaps something to improve: url: https://github.com/0day-ci/linux/commits/Lyude-Paul/Fix-legacy-DPMS-changes-with-MST/20180919-203434 base: git://anongit.freedesktop.org/drm-intel for-linux-next smatch warnings: drivers/gpu/drm/drm_dp_mst_topology.c:314

[PATCH] drm/amdgpu: fix a NULL check in debugfs init

2018-09-26 Thread Dan Carpenter
The debugfs_create_file() returns error pointers if DEBUGFS isn't enabled. But here, we know that it is enabled so it returns NULL on error which could lead to a NULL dereference a few lines later. Signed-off-by: Dan Carpenter --- If someone wanted to delete the error handling as well

Re: [PATCH resend 00/15] staging: vboxvideo: Convert to atomic modesetting API

2018-10-01 Thread Dan Carpenter
Why are you resending this? It's because you added some more patches on the end? Just send those as a new series... regards, dan carpenter ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinf

[bug report] drm/sun4i: Handle DRM_BUS_FLAG_PIXDATA_*EDGE checking if panel is used.

2018-10-01 Thread Dan Carpenter
^^ Unpossible to be an error pointer! 559 struct drm_panel *panel = tcon->panel; 560 struct drm_connector *connector = panel->connector; 561 struct drm_display_info displ

[bug report] drm/msm: Add SDM845 DPU support

2018-10-01 Thread Dan Carpenter
kthread_init_worker(&priv->event_thread[i].worker); 570 priv->event_thread[i].dev = ddev; 571 priv->event_thread[i].thread = 572 kthread_run(kthread_worker_fn, 573 &a

Re: [bug report] drm/msm: Add SDM845 DPU support

2018-10-01 Thread Dan Carpenter
On Mon, Oct 01, 2018 at 12:38:56PM +0300, Dan Carpenter wrote: > Hello Jeykumar Sankaran, > > The patch 25fdd5933e4c: "drm/msm: Add SDM845 DPU support" from Jun > 27, 2018, leads to the following static checker warning: > > drivers/gpu/drm/msm/msm_drv.c:562

[PATCH] drm/omap: Use after free in omap_connector_destroy()

2018-10-01 Thread Dan Carpenter
We can free "omap_connector" until the end of the function. Fixes: 949ea2ef3fed ("drm/omap: Don't call HPD registration operations recursively") Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/omapdrm/omap_connector.c b/drivers/gpu/drm/omapdrm/omap_conne

[PATCH] fbdev: omapfb: off by one in omapfb_register_client()

2018-07-13 Thread Dan Carpenter
The omapfb_register_client[] array has OMAPFB_PLANE_NUM elements so the > should be >= or we are one element beyond the end of the array. Fixes: 8b08cf2b64f5 ("OMAP: add TI OMAP framebuffer driver") Signed-off-by: Dan Carpenter diff --git a/drivers/video/fbdev/omap/omapfb_m

[PATCH] drm/etnaviv: fix some off by one bugs

2018-07-13 Thread Dan Carpenter
tructure to query perf counter") Signed-off-by: Dan Carpenter --- Not tested. diff --git a/drivers/gpu/drm/etnaviv/etnaviv_perfmon.c b/drivers/gpu/drm/etnaviv/etnaviv_perfmon.c index 9980d81a26e3..4227a4006c34 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_perfmon.c +++ b/drivers

[PATCH] fbdev: omapfb: off by one in omapfb_register_client()

2018-07-13 Thread Dan Carpenter
The omapfb_register_client[] array has OMAPFB_PLANE_NUM elements so the > should be >= or we are one element beyond the end of the array. Fixes: 8b08cf2b64f5 ("OMAP: add TI OMAP framebuffer driver") Signed-off-by: Dan Carpenter diff --git a/drivers/video/fbdev/omap/omapfb_m

[PATCH] drm/vkms: off by one in vkms_gem_fault()

2018-07-14 Thread Dan Carpenter
The > should be >= so that we don't read one page beyond the end of the obj->pages[] array. Fixes: 559e50fd34d1 ("drm/vkms: Add dumb operations") Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/vkms/vkms_gem.c b/drivers/gpu/drm/vkms/vkms_gem.c index c7e383686

[bug report] drm: re-enable error handling

2018-07-19 Thread Dan Carpenter
This can't be true. 376 DRM_DEBUG("Not enough free contexts.\n"); 377 /* Should this return -EBUSY instead? */ 378 return -ENOMEM; 379 } regards, dan carpenter _

[PATCH] drm/xen-front: Fix error code in xen_drm_front_gem_get_sg_table()

2018-07-19 Thread Dan Carpenter
The xen_drm_front_gem_get_sg_table() function is supposed to return error pointer. The current code, would trigger a NULL dereference in drm_gem_map_dma_buf(). Fixes: c575b7eeb89f ("drm/xen-front: Add support for Xen PV display frontend") Signed-off-by: Dan Carpenter diff --git a/d

[PATCH] drm/cma-helper: NULL dereference calling drm_gem_cma_prime_get_sg_table()

2018-07-19 Thread Dan Carpenter
This funciton is only called from drm_gem_map_dma_buf(). It's supposed to return error pointers on failure and returning a NULL pointer will lead to a NULL dereference. Fixes: 78467dc5f70f ("drm/cma: add low-level hook functions to use prime helpers") Signed-off-by: Dan Carpenter

Re: [PATCH] drm/xen-front: Fix error code in xen_drm_front_gem_get_sg_table()

2018-07-19 Thread Dan Carpenter
ese earlier. After a while these things all look the same. I once accidentally wrote and sent the same patch three times without realizing. Yeah. Please resend a v3. regards, dan carpenter ___ dri-devel mailing list dri-devel@lists.

Re: [PATCH] drm/xen-front: Fix error code in xen_drm_front_gem_get_sg_table()

2018-07-19 Thread Dan Carpenter
Oleksandr sent this patch already. Please disregard mine. regards, dan carpenter ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v3] drm: Replace NULL with error value in drm_prime_pages_to_sg

2018-07-19 Thread Dan Carpenter
Reviewed-by: Dan Carpenter regards, dan carpenter ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

[radeon-alex:drm-next-4.19-wip 101/128] drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega12_hwmgr.c:504 vega12_get_dpm_frequency_by_index() error: uninitialized symbol 'result'.

2018-07-19 Thread Dan Carpenter
tree: git://people.freedesktop.org/~agd5f/linux.git drm-next-4.19-wip head: 73b1f7132d9ad442b24d70d8769a4642302d6b49 commit: ce7577a2194b58bf7faf303612a24b7cd5210afc [101/128] drm/amdgpu/pp: split out common smumgr smu9 code smatch warnings: drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega1

[bug report] drm/amd/display: Read AUX channel even if only status byte is returned

2018-07-31 Thread Dan Carpenter
annel_reply(aux_engine, size, 675 buffer, reply, 676 &status); 677 678 break; regards, dan carpenter ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v1 5/5] tinydrm: add winstar wg160160 driver

2018-08-06 Thread Dan Carpenter
Hi Sam, I love your patch! Perhaps something to improve: url: https://github.com/0day-ci/linux/commits/Sam-Ravnborg/dt-bindings-add-parallel-data-bus-pardata/20180803-090135 smatch warnings: drivers/gpu/drm/tinydrm/wg160160.c:145 write_buf() warn: right shifting more than type allows 8 vs 8

[patch] drm/i915: use _safe version of list_for_each

2013-08-19 Thread Dan Carpenter
We sometimes call i915_vma_unbind() inside the loop and that can free the vma. Signed-off-by: Dan Carpenter --- Static checker stuff. Untested. diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c index 9b3b5f8..5249735 100644 --- a/drivers/gpu

drm/i915: Switch eviction code to use vmas

2013-08-19 Thread Dan Carpenter
This often frees the "vma". 144 145 list_del_init(&vma->exec_list); ^^^ Dereference. 146 drm_gem_object_unreference(&vma->obj->base); 147 } regards, dan carpenter

[patch] drm/omap: tiler: clear buffer properly

2013-08-22 Thread Dan Carpenter
We're taking the sizeof() the wrong thing so it doesn't clear the whole buffer. Signed-off-by: Dan Carpenter --- I can't compile this. diff --git a/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c b/drivers/gpu/drm/omapdrm/omap_dmm_tiler.c index 9b794c9..acf6678 100644 --- a/drivers/

[patch 1/2] gpu: host1x: fix an integer overflow check

2013-08-23 Thread Dan Carpenter
n overflow as well, but I think it's still safe because we check both "num_cmdbufs" and "num_relocs" again in this test. Signed-off-by: Dan Carpenter --- This is something I spotted in code review. I can't actually compile this code. I assume this overflow test

[patch 2/2] gpu: host1x: returning success instead of -ENOMEM

2013-08-23 Thread Dan Carpenter
There is a mistake here so it returns PTR_ERR(NULL) which is success instead of -ENOMEM. Signed-off-by: Dan Carpenter --- I can't compile this. diff --git a/drivers/gpu/host1x/job.c b/drivers/gpu/host1x/job.c index cc80766..6cf41da 100644 --- a/drivers/gpu/host1x/job.c +++ b/drivers/gpu/h

[patch -next] drm/prime: double lock typo

2013-08-23 Thread Dan Carpenter
There is a typo so deadlocks on error instead of unlocking. Signed-off-by: Dan Carpenter diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c index 7ae2bfc..276d470 100644 --- a/drivers/gpu/drm/drm_prime.c +++ b/drivers/gpu/drm/drm_prime.c @@ -552,7 +552,7 @@ fail

drm/ttm: Print debug information on memory manager when eviction fails

2013-12-04 Thread Dan Carpenter
pe_from_flags then mem_type can be TTM_PL_PRIV5 (8) but the bdev->man[] array only has TTM_NUM_MEM_TYPES (8) elements so we are one space beyond the end of the array. regards, dan carpenter

drm: update VIA driver to 2.7.2

2013-12-11 Thread Dan Carpenter
eue, 3 * DRM_HZ, 248 (((cur_irq_sequence = 249 atomic_read(&cur_irq->irq_received)) - 250*sequence) <= (1 << 23))); 251 } regards, dan carpenter

Re: [PATCH] drm/amd/gfx11: move the gfx mutex into the caller

2024-08-20 Thread Dan Carpenter
On Tue, Aug 20, 2024 at 10:39:09AM -0400, Alex Deucher wrote: > Otherwise we can fail to drop the software mutex when > we fail to take the hardware mutex. > > Fixes: 76acba7b7f12 ("drm/amdgpu/gfx11: add a mutex for the gfx semaphore") > Reported-by: Dan Carpenter >

[PATCH] drm/amd/display: fix some indenting in CalculatePrefetchSchedule()

2024-08-23 Thread Dan Carpenter
These tabs were deleted accidentally in commit d07722e1fc74 ("drm/amd/display: DML2.1 Reintegration for Various Fixes"). Add them back. Signed-off-by: Dan Carpenter --- .../dc/dml2/dml21/src/dml2_core/dml2_core_dcn4_calcs.c| 4 ++-- 1 file changed, 2 insertions(+), 2 deletion

Re: [PATCH v4 4/5] udmabuf: udmabuf_create codestyle cleanup

2024-08-29 Thread Dan Carpenter
in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202408291101.waf552sw-...@intel.com/ smatch warnings: drivers/dma-buf/udmabuf.c:467

[bug report] drm/msm: add msm8998 hdmi phy/pll support

2024-09-03 Thread Dan Carpenter
sure all registers are flushed to hardware */ 654 wmb(); 655 656 return 0; 657 } regards, dan carpenter

Re: [Intel-gfx] [PATCH v5 3/6] drm/i915/panelreplay: Initializaton and compute config for panel replay

2023-09-06 Thread Dan Carpenter
| Reported-by: kernel test robot | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202309060644.uwp5zw4i-...@intel.com/ smatch warnings: drivers/gpu/drm/i915/display/intel_dp.c:3779 intel_dp_vsc_sdp_pack() warn: was && intended here instead of ||? vim +3779 drivers/gpu/drm/i915

Re: [PATCH v16 15/20] drm/shmem-helper: Add memory shrinker

2023-09-07 Thread Dan Carpenter
tags | Reported-by: kernel test robot | Reported-by: Dan Carpenter | Closes: https://lore.kernel.org/r/202309070814.jygjojzy-...@intel.com/ smatch warnings: drivers/gpu/drm/drm_gem_shmem_helper.c:733 drm_gem_shmem_fault() error: we previously assumed 'shmem->pages' could be null

[PATCH] drm/i915/gt: Prevent error pointer dereference

2023-09-13 Thread Dan Carpenter
Move the check for "if (IS_ERR(obj))" in front of the call to i915_gem_object_set_cache_coherency() which dereferences "obj". Otherwise it will lead to a crash. Fixes: 43aa755eae2c ("drm/i915/mtl: Update cache coherency setting for context structure") Signed-off-b

Re: [PATCH v4 3/3] drm/panel-simple: allow LVDS format override

2023-09-13 Thread Dan Carpenter
about this code in v3 but it looks good now. I'm not a DRM dev so I'm not sure my review counts for much. You should always just assume that if I'm quiet then I'm happy. :) regards, dan carpenter

[drm-intel:for-linux-next-gt 1/4] drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:2680 guc_context_policy_init_v70() warn: variable dereferenced before check 'ce' (see line 2663)

2024-03-10 Thread Dan Carpenter
/20240310/202403101225.7ahejhzj-...@intel.com/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Reported-by: Dan Carpenter | Closes

Re: [PATCH 00/14] Add support for suppressing warning backtraces

2024-03-13 Thread Dan Carpenter
Thanks! Acked-by: Dan Carpenter regards, dan carpenter

Re: [PATCH 1/6] auxdisplay/ht16k33: Replace use of fb_blank with backlight helper

2024-03-13 Thread Dan Carpenter
advantage to making this const? regards, dan carpenter

Re: [PATCH 5/6] staging/fbtft: Remove reference to fb_blank

2024-03-13 Thread Dan Carpenter
aging/fbtft/fb_ssd1351.c | 4 +--- > drivers/staging/fbtft/fbtft-core.c | 5 ++--- Reviewed-by: Dan Carpenter regards, dan carpenter

Re: [PATCH 1/6] auxdisplay/ht16k33: Replace use of fb_blank with backlight helper

2024-03-13 Thread Dan Carpenter
ent/implements/. regards, dan carpenter

Re: [PATCH 0/6] backlight: Remove struct backlight_properties.fb_blank

2024-03-13 Thread Dan Carpenter
I was only going to comment on the staging bits but, heck, I reviewed the whole series. Reviewed-by: Dan Carpenter regards, dan carpenter

Re: [PATCH 3/6] backlight/omap1-bl: Replace FB_BLANK_ states with simple on/off

2024-03-14 Thread Dan Carpenter
as been around for over a year. I don't care about which > patches go in as long as they remove the dependency on . I saw > that Dan has already r-b'ed the current patchset, but if you prefer I'll > adopt yours. I hadn't seen Sam's patch. It's a little bit more daring, but it's really nice code and I trust him. regards, dan carpenter

<    4   5   6   7   8   9   10   11   12   13   >