similar to: [PATCH v3] drm/nouveau: Fix potential memory access error in debugfs_pstate_get/set()

Displaying 20 results from an estimated 900 matches similar to: "[PATCH v3] drm/nouveau: Fix potential memory access error in debugfs_pstate_get/set()"

2018 Jul 31
0
[PATCH v2] drm/nouveau: Fix potential memory access error in nouveau_debugfs_pstate_get()
nouveau_debugfs(drm) will never be NULL, because we're taking the value of the potentially null device pointer and adding to it so it isn't 0x0. So, check if drm is NULL instead. Signed-off-by: Lyude Paul <lyude at redhat.com> Cc: Karol Herbst <karolherbst at gmail.com> --- Forgot to hit :w before committing, whoops! drivers/gpu/drm/nouveau/nouveau_debugfs.c | 8 +++++--- 1
2018 Jul 31
1
[PATCH] drm/nouveau: Fix potential memory access error in nouveau_debugfs_pstate_get()
nouveau_debugfs(drm) will never be NULL, because we're taking the value of the potentially null device pointer and adding to it so it isn't 0x0. So, check if drm is NULL instead. Signed-off-by: Lyude Paul <lyude at redhat.com> Cc: Karol Herbst <karolherbst at gmail.com> --- drivers/gpu/drm/nouveau/nouveau_debugfs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
2023 Apr 16
0
[PATCH 2/9] drm/nouveau/debugfs: Move a variable assignment behind a null pointer check in nouveau_debugfs_pstate_get()
Date: Sat, 15 Apr 2023 21:24:43 +0200 The address of a data structure member was determined before a corresponding null pointer check in the implementation of the function ?nouveau_debugfs_pstate_get?. Thus avoid the risk for undefined behaviour by moving the assignment for the variable ?ctrl? behind the null pointer check. This issue was detected by using the Coccinelle software. Fixes:
2023 Apr 16
0
[PATCH 1/9] drm/nouveau/debugfs: Move an expression into a function call parameter in nouveau_debugfs_pstate_set()
Date: Sat, 15 Apr 2023 21:06:06 +0200 The address of a data structure member was determined before a corresponding null pointer check in the implementation of the function ?nouveau_debugfs_pstate_set?. Thus avoid the risk for undefined behaviour by moving the usage of an expression into a parameter for a function call at the end. This issue was detected by using the Coccinelle software. Fixes:
2023 Apr 16
10
[PATCH 0/9] GPU-DRM-nouveau: Adjustments for seven function implementations
Date: Sun, 16 Apr 2023 11:22:23 +0200 Several update suggestions were taken into account from static source code analysis. Markus Elfring (9): debugfs: Move an expression into a function call parameter in nouveau_debugfs_pstate_set() debugfs: Move a variable assignment behind a null pointer check in nouveau_debugfs_pstate_get() debugfs: Use seq_putc() in
2016 Mar 21
0
[PATCH v2 22/22] debugfs: add boost interface to change the boost_mode
Signed-off-by: Karol Herbst <nouveau at karolherbst.de> --- drm/nouveau/nouveau_debugfs.c | 76 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/drm/nouveau/nouveau_debugfs.c b/drm/nouveau/nouveau_debugfs.c index 3d0dc19..31b309f 100644 --- a/drm/nouveau/nouveau_debugfs.c +++ b/drm/nouveau/nouveau_debugfs.c @@ -180,6 +180,81 @@ static const struct
2015 Nov 09
5
[PATCH v2 0/5] move pstate interface to debugfs
I made a little changes in this series: 1. merge the two last patches together 2. unify the private data interface with the drm debugfs one now it should be very obvious for a new dev on how to add new files to debugfs and how to get access to the nouveau structs Karol Herbst (5): debugfs: add infrastructure to add files with other fops than only read debugfs: rename functions to
2017 Nov 22
1
[PATCH 02/32] debugfs: Wake up GPU before doing any reclocking
On 17/11/17 02:04, Karol Herbst wrote: > Fixes various reclocking related issues on prime systems. Is that the only place that was not covered? Could you check if other places would need this code too? In any case, this patch is (assuming you are calling the right functions to prevent the GPU from sleeping): Signed-off-by: Martin Peres <martin.peres at free.fr> > > Signed-off-by:
2019 Sep 04
1
[PATCH] drm/nouveau: add missing single_release()
When using single_open() for opening, single_release() should be used, otherwise there is a memory leak. This is detected by Coccinelle semantic patch. Fixes: 6e9fc177399f ("drm/nouveau/debugfs: add copy of sysfs pstate interface ported to debugfs") Signed-off-by: Wei Yongjun <weiyongjun1 at huawei.com> --- drivers/gpu/drm/nouveau/nouveau_debugfs.c | 1 + 1 file changed, 1
2017 Nov 17
0
[PATCH 02/32] debugfs: Wake up GPU before doing any reclocking
Fixes various reclocking related issues on prime systems. Signed-off-by: Karol Herbst <karolherbst at gmail.com> --- drm/nouveau/nouveau_debugfs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drm/nouveau/nouveau_debugfs.c b/drm/nouveau/nouveau_debugfs.c index 963a4dba..9109b69c 100644 --- a/drm/nouveau/nouveau_debugfs.c +++ b/drm/nouveau/nouveau_debugfs.c @@ -160,7 +160,11 @@
2019 Feb 28
0
[PATCH] drm/nouveau/debugfs: Fix check of pm_runtime_get_sync failure
From: YueHaibing <yuehaibing at huawei.com> pm_runtime_get_sync returns negative on failure. Fixes: eaeb9010bb4b ("drm/nouveau/debugfs: Wake up GPU before doing any reclocking") Signed-off-by: YueHaibing <yuehaibing at huawei.com> --- drivers/gpu/drm/nouveau/nouveau_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git
2019 Mar 30
0
[PATCH AUTOSEL 5.0 59/67] drm/nouveau/debugfs: Fix check of pm_runtime_get_sync failure
From: YueHaibing <yuehaibing at huawei.com> [ Upstream commit 909e9c9c428376e2a43d178ed4b0a2d5ba9cb7d3 ] pm_runtime_get_sync returns negative on failure. Fixes: eaeb9010bb4b ("drm/nouveau/debugfs: Wake up GPU before doing any reclocking") Signed-off-by: YueHaibing <yuehaibing at huawei.com> Signed-off-by: Ben Skeggs <bskeggs at redhat.com> Signed-off-by: Sasha Levin
2019 Mar 30
0
[PATCH AUTOSEL 4.19 47/52] drm/nouveau/debugfs: Fix check of pm_runtime_get_sync failure
From: YueHaibing <yuehaibing at huawei.com> [ Upstream commit 909e9c9c428376e2a43d178ed4b0a2d5ba9cb7d3 ] pm_runtime_get_sync returns negative on failure. Fixes: eaeb9010bb4b ("drm/nouveau/debugfs: Wake up GPU before doing any reclocking") Signed-off-by: YueHaibing <yuehaibing at huawei.com> Signed-off-by: Ben Skeggs <bskeggs at redhat.com> Signed-off-by: Sasha Levin
2019 Mar 30
0
[PATCH AUTOSEL 4.14 33/37] drm/nouveau/debugfs: Fix check of pm_runtime_get_sync failure
From: YueHaibing <yuehaibing at huawei.com> [ Upstream commit 909e9c9c428376e2a43d178ed4b0a2d5ba9cb7d3 ] pm_runtime_get_sync returns negative on failure. Fixes: eaeb9010bb4b ("drm/nouveau/debugfs: Wake up GPU before doing any reclocking") Signed-off-by: YueHaibing <yuehaibing at huawei.com> Signed-off-by: Ben Skeggs <bskeggs at redhat.com> Signed-off-by: Sasha Levin
2019 Sep 05
0
[PATCH] drm/nouveau: add missing single_release()
Reviewed-by: Karol Herbst <kherbst at redhat.com> On Thu, Sep 5, 2019 at 9:14 AM Wei Yongjun <weiyongjun1 at huawei.com> wrote: > > When using single_open() for opening, single_release() should be > used, otherwise there is a memory leak. > > This is detected by Coccinelle semantic patch. > > Fixes: 6e9fc177399f ("drm/nouveau/debugfs: add copy of sysfs pstate
2020 May 20
0
[PATCH] drm/nouveau/debugfs: fix runtime pm imbalance on error
pm_runtime_get_sync() increments the runtime PM usage counter even the call returns an error code. Thus a pairing decrement is needed on the error handling path to keep the counter balanced. Signed-off-by: Dinghao Liu <dinghao.liu at zju.edu.cn> --- drivers/gpu/drm/nouveau/nouveau_debugfs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git
2018 Jul 28
0
[PATCH] drm/nouveau/debugfs: fix pm_runtime.cocci warnings (fwd)
From: kbuild test robot <fengguang.wu at intel.com> pm_runtime_get_sync returns < 0 as error. Unecessary IS_ERR_VALUE at line 164 Generated by: scripts/coccinelle/api/pm_runtime.cocci Fixes: eaeb9010bb4b ("drm/nouveau/debugfs: Wake up GPU before doing any reclocking") CC: Karol Herbst <karolherbst at gmail.com> Signed-off-by: kbuild test robot <fengguang.wu at
2018 Sep 06
0
[PATCH] drm/nouveau/debugfs: fix pm_runtime.cocci warnings
From: kbuild test robot <fengguang.wu at intel.com> pm_runtime_get_sync returns < 0 as error. Unecessary IS_ERR_VALUE at line 164 Generated by: scripts/coccinelle/api/pm_runtime.cocci Fixes: eaeb9010bb4b ("drm/nouveau/debugfs: Wake up GPU before doing any reclocking") CC: Karol Herbst <karolherbst at gmail.com> Signed-off-by: kbuild test robot <fengguang.wu at
2016 Aug 22
0
[PATCH v2] drm/nouveau: add a LED driver for the NVIDIA logo
v2: - guard LED framework calls with ifdef CONFIG_LEDS_CLASS Signed-off-by: Martin Peres <martin.peres at free.fr> --- For real this time! Sorry for the noise drm/nouveau/Kbuild | 1 + drm/nouveau/include/nvkm/subdev/bios/gpio.h | 1 + drm/nouveau/nouveau_drm.c | 7 ++ drm/nouveau/nouveau_drv.h | 3 +
2016 Aug 23
1
[PATCH v2] drm/nouveau: add a LED driver for the NVIDIA logo
On 23/08/16 11:31, Karol Herbst wrote: > maybe it makes sense to expose the SLI LED, too. > > Regardless of my comments this patch is reviewed-by me. You reviewed the wrong patch, I should have named the re-send v3. I accidentally sent the v1 patch as a v2 :s > > 2016-08-23 1:39 GMT+02:00 Martin Peres <martin.peres at free.fr>: >> We received a donation of a Titan