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
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/metrono
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:
[ 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:
lied 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.
> Signed-off-by: Christian Köni
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
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
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
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
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/drivers/g
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
___
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")
Signed-o
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 <dan.carpen...@oracle.com>
diff --git a/drivers/gpu/drm/v3d/v3d_sched.c b/dri
"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 <dan.carpen...@oracle.com>
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimc.c
b/drivers/gpu/drm/exyn
x_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_smumgr.c:1725
vegam_populate_avfs_parameters() erro
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
regards,
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-devel mailin
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
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_MAX -
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 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:
> >
> >
and
because of how we picked args->width that means cpp < UINT_MAX / 4.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
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..45b0b5
how we picked args->width that means cpp < UINT_MAX / 4.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
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 w
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 <dan.carpen...@oracle.com>
diff --git a/drivers/gpu/
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")
Signed-o
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 <dan.carpen...@oracle.com>
diff --git a/drivers/gpu/drm/xen/xen_drm_front.c
b/drivers/gpu/drm/xen/xen_d
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:
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:
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:
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:
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
for this to be bigger than the number 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-d
args->n_devices is a u32 that comes from the user. The multiplication
could overflow on 32 bit systems possibly leading to privilege
escalation.
Fixes: 5ec7e02854b3 ("drm/amdkfd: Add ioctls for GPUVM memory management")
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com>
diff
tree: git://people.freedesktop.org/~agd5f/linux.git drm-next-4.18-wip
head: 52132fd03504140b4cc58c01b19e82929a03af7a
commit: 7bcfcb8217c6ab4224c7de5074132f2185558b72 [182/214] drm/amdgpu: simplify
bo_va list when vm bo update (v2)
smatch warnings:
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1571
tree: git://people.freedesktop.org/~agd5f/linux.git amd-staging-drm-next
head: d64547a1cfa860e241b27723c88f86fa3d88d3d7
commit: d6c9a7dc86cd39146afb0f47c06b6f95d7dd4997 [170/201] drm/amd/pp: Move
common code to smu_helper.c
smatch warnings:
en
we return -ENOMEM.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/gpu/drm/omapdrm/tcm-sita.c
b/drivers/gpu/drm/omapdrm/tcm-sita.c
index d7f7bc9f061a..817be3c41863 100644
--- a/drivers/gpu/drm/omapdrm/tcm-sita.c
+++ b/drivers/gpu/drm/omapdrm/tcm-sita.c
@@ -90,7 +90,7
his.
>
> It's complex to have to remember the preferences for every subsystem.
> Preferences should be expressed in the MAINTAINERS file in some way.
> Also, since no one reads lkml, does it hurt to have even trivial patches?
I always tell people not to CC lkml when there
ot suitable for cursor\n");
528 ret = -EINVAL;
529 }
530
531 return ret;
532 }
regards,
dan carpenter
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Since we enforce that "vma->vm_pgoff" has to be zero it means we don't
need an additional cap on the upper bound.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/gpu/drm/gma500/framebuffer.c
b/drivers/gpu/drm/gma500/framebuffer.c
index cb0a2ae
This has a static checker warning because "frev" and "crev" can be
uninitialized if "info" is NULL. I just changed the order of the checks
so that we check "info" first.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drive
ut;
392 u32 val;
393 int i;
394
395 if (!crtc || !crtc->state)
Too late.
396 return;
397
regards,
dan carpenter
___
dri-devel mailing list
dri-devel@lists.freedesk
2c_client *i2c, const
> struct i2c_device_id *id)
> adv7511_audio_init(dev, adv7511);
> return 0;
>
> +err_unregister_packet:
> + i2c_unregister_device(adv7511->i2c_packet);
> err_unregister_cec:
> i2c_unregister_device(adv7511->i2c_cec
that Geert found where the right side
wasn't a number literal.
drivers/net/can/m_can/m_can.c:#define RXFC_FWM_MASK (0x7f < RXFC_FWM_SHIFT)
drivers/usb/gadget/udc/goku_udc.h:#define INT_EPnNAK(n) (0x00100 < (n))
/* 0 < n < 4 */
regards,
d
On Tue, Feb 06, 2018 at 02:15:51PM +0100, Julia Lawall wrote:
>
>
> On Tue, 6 Feb 2018, Dan Carpenter wrote:
>
> > On Mon, Feb 05, 2018 at 09:09:57PM +0100, Wolfram Sang wrote:
> > > In one Renesas driver, I found a typo which turned an intended bit shift
> >
- reissue_mask |= 0x < 4;
+ reissue_mask |= 0x << 4;
regards,
dan carpenter
> Wolfram Sang (4):
> v4l: vsp1: fix mask creation for MULT_ALPHA_RATIO
> drm/exynos: fix comparison to bitshift when dealing with a mask
>
We deleted some code in e154162ef75d ("drm/amd/powerplay: refine pp code
for raven") but there were a few related bits that were missed. Let's
delete them as well.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
b
tree: git://people.freedesktop.org/~agd5f/linux.git drm-next-4.17-wip
head: 5d9e45135f05706b787fe2882442a78f92ae9cd1
commit: c0d382de6b810f9560a22d0d7e5837351265cd7b [151/209] drm/amd/pp: Add
edit/commit/show OD clock/voltage support in sysfs
smatch warnings:
The parentheses are in the wrong place here so we pass the bits per
pixel as zero.
Fixes: abbee6238775 ("drm/mgag200: Added resolution and bandwidth limits for
various G200e products.")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
Static analysis. Not tes
We accidentally passed the wrong variable to PTR_ERR().
Fixes: a0c1214e4764 ("drm/sun4i: Add LVDS support")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c
b/drivers/gpu/drm/sun4i/sun4i_tcon.c
index b78fed809992..3c1
Hi Samuel,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on drm/drm-next]
[also build test WARNING on v4.15-rc7 next-20180110]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system]
url:
we can hit that error. But I don't have the hardware
to test this code.
Fixes: d80efd5cb3de ("drm/vmwgfx: Initial DX support")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
466 struct vmw_private *dev_priv = vmw_priv(crtc->dev);
^
Unchecked dereference
467 struct vmw_framebuffer *vfb =
vmw_framebuffer_to_vfb(new_fb);
468
regards,
dan carpenter
We use "mc" without initializing it if scaling is not necessary.
Fixes: 28ce675b7474 ("drm: mali-dp: Add plane upscaling support")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/gpu/drm/arm/malidp_planes.c
b/drivers/gpu/drm/arm/malidp_p
We recently modified drm_fb_helper_single_add_all_connectors() to allow
NULL "fb_helper" pointers. But the problem is that it gets
dereferenced before we checked for NULL.
Fixes: c777990fb45b ("drm/fb-helper: Handle function NULL argument")
Signed-off-by: Dan Carpenter <d
ret = vmw_cotable_notify(res, cmd->defined_id);
2743 vmw_resource_unreference();
2744 if (unlikely(ret != 0))
2745 return ret;
2746
regards,
dan carpenter
___
dri-devel mailing list
dri-devel@lists.freedes
The code seems to assume that of_fdt_unflatten_tree() sets "overlay" to
NULL on error but actually it could be uninitialized.
Fixes: 4e7221580223 ("drm/tilcdc: Add DRM_TILCDC_SLAVE_COMPAT for
ti,tilcdc,slave binding support")
Signed-off-by: Dan Carpenter <dan.carpen...@
We cap the upper bound of "fbnum" but we also need to check for
negatives or make the type unsigned.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c
b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c
in
We assign "v_init = asic_blank_start;" a few lines earlier so there is
no need to do it again inside the if statements. Also "v_init" is
unsigned so it can't be less than zero.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/gp
backlight_device_register() never returns NULL, it returns error
pointers on error so the check here is wrong.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
selves because it scales better than relying on me to do it.
regards,
dan carpenter
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:2224 amdgpu_device_init() warn:
'adev->rio_mem' was not released on error
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:2395 amdgpu_device_init() warn:
'adev->rio_mem' was
e string constant twice.
>
> Do you distinguish between merging of constants and the combination
> of statements for such an use case?
I would have rejected the patch even if GCC didn't combine the strings
because the most important thing is that
On Mon, Nov 06, 2017 at 09:40:19AM +0100, Nicolas Ferre wrote:
> If you want to lower the size of strings in this driver, you can do it,
> but not like this.
Just so we're clear, GCC already detects and combines it when you use
the same string constant twice.
regards,
dan car
not really appropriate here so it should be removed
as well.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
v2: in v1 I just added a tab
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c
b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c
index d91159
On Sat, Nov 04, 2017 at 10:16:23AM +0100, walter harms wrote:
>
>
> Am 04.11.2017 07:12, schrieb Dan Carpenter:
> > The if statement wasn't indented so it makes static analysis tools and
> > probably very recent GCC versions complain.
> >
> > Signed-
The if statement wasn't indented so it makes static analysis tools and
probably very recent GCC versions complain.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
I went over 80 characters because other lines do already and it seemed
like the cleanest thing here.
diff --git a/d
"ret" needs to be signed for the error handling to work.
Fixes: 8d7f934df8d8 ("omapdrm: hdmi4_cec: add OMAP4 HDMI CEC support")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c
b/drivers/gpu/drm/oma
ck not sufficient so far to reach
> a final consensus.
Markus, you really have to listen better or you're going to get banned
from more subsystems. These long email threads are a waste of time when
we already answered your questions completely and over and over. The
feedbac
> >>
> >
> > This one is fine
>
> This kind of feedback is nice.
>
>
> > except for the commit message.
>
> Would you like to support Unicode characters there?
>
Multiple people have answered this question already and I have answered
it multiple time
ipt “checkpatch.pl” pointed information out like the following.
>
> Comparison to NULL could be written !…
>
> Thus fix the affected source code places.
>
This one is fine except for the commit message.
regards,
dan carpenter
__
goto free_three;
}
Of course, having a big unlock label makes sense if you take a lock at
the start of the function and need to drop it at the end. But in this
case we are taking a lock then dropping it, and taking the next, then
dropping it and so on. It's a different situation.
regard
out of three error
messages happened to be the same and Markus wants to save a bit of
memory by using the same string. The memory savings is not so big that
it's worth making the code less readable.
regards,
dan carpenter
___
dri-devel mailing list
dri
On Tue, Oct 24, 2017 at 01:11:07PM +0300, Jani Nikula wrote:
> On Tue, 24 Oct 2017, Dan Carpenter <dan.carpen...@oracle.com> wrote:
> > We accidentally inverted an if statement and turned amd_powerplay_reset()
> > into a no-op.
> >
> > Fixes: ae97988fc89e ("
We accidentally inverted an if statement and turned amd_powerplay_reset()
into a no-op.
Fixes: ae97988fc89e ("drm/amd/powerplay: tidy up ret checks in amd_powerplay.c
(v3)")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
IMHO, tidying unreadable double negatives is
r < 0 but you're doing it again.
And it introduces a bug, although I see now that you fixed it in v2.
I can't get excited about these sort of risky low value patches.
>
> +report_failure:
> + dev_err(ctx->dev, "writebm: %4s[0x%02x] <- 0x%02x\n",
> + sii9234_client_name[id], offset, value);
> + ctx->i2c_error = ret;
> return ret;
> }
regards,
dan carpenter
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Pi 7"
Touchscreen.")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c
index 890fd6ff397c..d964d454e4ae 100644
--- a/drivers/gpu/drm/panel/panel-raspberryp
We free "edid", then use it again on the next line.
Fixes: 3b1b975003e4 ("drm: adv7511/33: add HDMI CEC support")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
b/drivers/gpu/drm/bridge/adv7511/adv751
0;
Heh... It looks like they were deliberately silencing the warning about
the bug you fixed in patch 2/8. :P
regards,
dan carpenter
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
inlock held warnings.
Otherwise you'd have to hit the deadlock and you have to be pretty
unlucky to hit it so these bugs sometimes do go unreported for a long
time.
regards,
dan carpenter
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
The of_graph_get_remote_node() function doesn't return error pointers,
it returns NULL on error so I've updated the check.
Fixes: 86418f90a4c1 ("drm: convert drivers to use of_graph_get_remote_node")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/g
t;r" to zero
at the start.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index bbcc67038203..fb3afab55907 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/a
also possible I may have missed something.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
index b46280c1279f..2918de2f39ec 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
+++ b/
The callers expect "panel" to be initialized, but that isn't true if we
return -ENODEV. It causes bugs like:
drivers/gpu/drm/tve200/tve200_drv.c:83 tve200_modeset_init()
error: uninitialized symbol 'panel'.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff
devm_ioremap_resource() returns error pointer, it never returns NULL on
error.
Fixes: 179c02fe90a4 ("drm/tve200: Add new driver for TVE200")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/gpu/drm/tve200/tve200_drv.c
b/drivers/gpu/drm/tve200/tv
^^^
but it also adds a new dereference.
131
132 ret = drm_vblank_init(dev, 1);
regards,
dan carpenter
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
On Tue, Sep 12, 2017 at 03:02:04PM +0100, Emil Velikov wrote:
> That said, I'm not sure how useful the information is - perhaps it's
> better to drop it all together?
Or a WARN_ONCE().
regards,
dan carpenter
___
dri-devel mailing list
dri
ISCRETE_MC_REGISTER_ARRAY_SIZE".
The "table->last" value can't possibly be greater than the array size
and it is allowed to be equal to it. So let's just remove that test
entirely.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
Not tested. Please review this one care
ISCRETE_MC_REGISTER_ARRAY_SIZE".
The "table->last" value can't possibly be greater than the array size
and it is allowed to be equal to it. So let's just remove that test
entirely.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
Not tested. Please review this one c
On Fri, Aug 18, 2017 at 08:46:25AM +0100, Chris Wilson wrote:
> Quoting Dan Carpenter (2017-08-18 08:07:00)
> > There are some potential integer overflows here on 64 bit systems.
> >
> > The condition "if (nfences > SIZE_MAX / sizeof(*fences))" can only be
> &
loc_array(args->buffer_count + 1, sz,
^^
Originally, those two integer overflow checks were against UINT_MAX
instead of SIZE_MAX and this patch changes them back.
Fixes: 2889caa92321 ("drm/i915: Eliminate lots of iterations over the
exec
On Thu, Aug 17, 2017 at 07:16:03AM -0700, Jason Ekstrand wrote:
> On Thu, Aug 17, 2017 at 2:56 AM, Imre Deak <imre.d...@intel.com> wrote:
>
> > On Thu, Aug 17, 2017 at 12:50:37PM +0300, Dan Carpenter wrote:
> > > On Thu, Aug 17, 2017 at 12:37:00PM +0300, Imre Deak wr
On Thu, Aug 17, 2017 at 12:37:00PM +0300, Imre Deak wrote:
> On Thu, Aug 17, 2017 at 09:23:10AM +0300, Dan Carpenter wrote:
> > There are some potential integer overflows here on 64 bit systems.
> >
> > The condition "if (nfences > SIZE_MAX / sizeof(*fences))&qu
flow if it's set to UINT_MAX
when we do:
exec2_list = kvmalloc_array(args->buffer_count + 1, sz,
^^
Fixes: 2889caa92321 ("drm/i915: Eliminate lots of iterations over the
execobjects array")
Signed-off-by: Dan Carpenter <
If the kmalloc() fails then we dereference "state" when we set
"state->zpos".
Fixes: 3dfeb631a15d ("drm/omap: Rework the rotation-on-crtc hack")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c
b/dr
"gpu->aspace" can be either an error pointer or NULL so we need to check
for both.
Fixes: 0dbd7327f4d5 ("drm/msm: Move memptrs to msm_gpu")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm
On Wed, Aug 09, 2017 at 03:38:33PM +0100, Daniel Stone wrote:
> On 9 August 2017 at 15:36, Sean Paul <seanp...@chromium.org> wrote:
> > On Wed, Aug 09, 2017 at 02:19:06PM +0300, Dan Carpenter wrote:
> >> "plane->format_count" can go up to 64. (It's capped in
On Thu, Aug 10, 2017 at 03:02:53PM +0200, Christian König wrote:
> Am 10.08.2017 um 14:53 schrieb Dan Carpenter:
> > On Thu, Aug 10, 2017 at 02:30:15PM +0200, Christian König wrote:
> > > Am 10.08.2017 um 14:16 schrieb Dan Carpenter:
> > > > "frag_align"
On Thu, Aug 10, 2017 at 02:30:15PM +0200, Christian König wrote:
> Am 10.08.2017 um 14:16 schrieb Dan Carpenter:
> > "frag_align" is a u64, so presumably we want to use the high bits as
> > well instead of shift wrapping.
> >
> > Fixes: 6be7adb37d9b (&qu
On Thu, Aug 10, 2017 at 02:30:15PM +0200, Christian König wrote:
> Am 10.08.2017 um 14:16 schrieb Dan Carpenter:
> > "frag_align" is a u64, so presumably we want to use the high bits as
> > well instead of shift wrapping.
> >
> > Fixes: 6be7adb37d9b (&qu
"frag_align" is a u64, so presumably we want to use the high bits as
well instead of shift wrapping.
Fixes: 6be7adb37d9b ("drm/amdgpu: increase fragmentation size for Vega10 v2")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/gpu/drm
"plane->format_count" can go up to 64. (It's capped in
drm_universal_plane_init().) So we should be using ULL type instead of
int here to prevent shift wrapping.
Fixes: db1689aa61bd ("drm: Create a format/modifier blob")
Signed-off-by: Dan Carpenter <dan.carpen.
801 - 900 of 1463 matches
Mail list logo