Displaying 20 results from an estimated 26 matches for "drm_mode_dupl".
2023 Oct 07
1
[PATCH] drm/nouveau/dispnv04: fix a possible null pointer dereference
In nv17_tv_get_ld_modes(), the return value of drm_mode_duplicate()
is assigned to mode, which will lead to a NULL pointer dereference
on failure of drm_mode_duplicate(). Add a check to avoid npd.
Signed-off-by: Ma Ke <make_ruc2021 at 163.com>
---
drivers/gpu/drm/nouveau/dispnv04/tvnv17.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/...
2024 Jun 25
1
[PATCH] drm/nouveau/dispnv04: fix null pointer dereference in nv17_tv_get_ld_modes
> In nv17_tv_get_ld_modes(), the return value of drm_mode_duplicate() is
> assigned to mode, which will lead to a possible NULL pointer dereference
> on failure of drm_mode_duplicate(). Add a check to avoid npd.
Can a wording approach (like the following) be a better change description?
A null pointer is stored in the local variable ?mode? after a ca...
2024 Jun 26
1
[PATCH] drm/nouveau: fix null pointer dereference in nouveau_connector_get_modes
On Wed, 26 Jun 2024, Ma Ke <make24 at iscas.ac.cn> wrote:
> In nouveau_connector_get_modes(), the return value of drm_mode_duplicate()
> is assigned to mode, which will lead to a possible NULL pointer
> dereference on failure of drm_mode_duplicate(). Add a check to avoid npd.
>
> Signed-off-by: Ma Ke <make24 at iscas.ac.cn>
> ---
> drivers/gpu/drm/nouveau/nouveau_connector.c | 2 ++
> 1 file chan...
2024 Jun 27
1
[PATCH v3] drm/nouveau: fix null pointer dereference in nouveau_connector_get_modes
> In nouveau_connector_get_modes(), the return value of drm_mode_duplicate()
> is assigned to mode, which will lead to a possible NULL pointer
> dereference on failure of drm_mode_duplicate(). Add a check to avoid npd.
A) Can a wording approach (like the following) be a better change description?
A null pointer is stored in the local variable ?mode? after...
2023 Oct 13
1
[PATCH] drm/nouveau/dispnv04: fix a possible null pointer dereference
In nv17_tv_get_hd_modes(), the return value of drm_mode_duplicate()
is assigned to mode, which will lead to a NULL pointer dereference on
failure of drm_mode_duplicate(). The same applies to drm_cvt_mode().
Add a check to avoid null pointer dereference.
Signed-off-by: Ma Ke <make_ruc2021 at 163.com>
---
drivers/gpu/drm/nouveau/dispnv04/tvnv17.c | 4 +...
2024 Jun 25
0
[PATCH] drm/nouveau/dispnv04: fix null pointer dereference in nv17_tv_get_hd_modes
> In nv17_tv_get_hd_modes(), the return value of drm_mode_duplicate() is
> assigned to mode, which will lead to a possible NULL pointer dereference
> on failure of drm_mode_duplicate(). The same applies to drm_cvt_mode().
> Add a check to avoid null pointer dereference.
Can a wording approach (like the following) be a better change description?
A...
2024 Jun 25
0
[PATCH] drm/nouveau/dispnv04: fix null pointer dereference in nv17_tv_get_ld_modes
Reviewed-by: Lyude Paul <lyude at redhat.com>
On Tue, 2024-06-25 at 16:18 +0800, Ma Ke wrote:
> In nv17_tv_get_ld_modes(), the return value of drm_mode_duplicate()
> is
> assigned to mode, which will lead to a possible NULL pointer
> dereference
> on failure of drm_mode_duplicate(). Add a check to avoid npd.
>
> Cc: stable at vger.kernel.org
> Signed-off-by: Ma Ke <make24 at iscas.ac.cn>
> ---
> ?drivers/gpu/drm/nouvea...
2024 Jun 25
0
[PATCH] drm/nouveau/dispnv04: fix null pointer dereference in nv17_tv_get_hd_modes
Reviewed-by: Lyude Paul <lyude at redhat.com>
I will push this and the other patch that you sent upstream in just a
moment, thanks!
On Tue, 2024-06-25 at 16:10 +0800, Ma Ke wrote:
> In nv17_tv_get_hd_modes(), the return value of drm_mode_duplicate()
> is
> assigned to mode, which will lead to a possible NULL pointer
> dereference
> on failure of drm_mode_duplicate(). The same applies to
> drm_cvt_mode().
> Add a check to avoid null pointer dereference.
>
> Cc: stable at vger.kernel.org
> Signed-off-by: Ma Ke...
2024 Jun 26
0
[PATCH] drm/nouveau: fix null pointer dereference in nouveau_connector_get_modes
> In nouveau_connector_get_modes(), the return value of drm_mode_duplicate()
> is assigned to mode, which will lead to a possible NULL pointer
> dereference on failure of drm_mode_duplicate(). Add a check to avoid npd.
1. Can a wording approach (like the following) be a better change description?
A null pointer is stored in the local variable ?mode? after...
2024 Jun 28
0
[PATCH v2] drm/nouveau: fix null pointer dereference in nouveau_connector_get_modes
Reviewed-by: Lyude Paul <lyude at redhat.com>
Will push this upstream in just a moment, thanks!
On Thu, 2024-06-27 at 10:27 +0800, Ma Ke wrote:
> In nouveau_connector_get_modes(), the return value of
> drm_mode_duplicate()
> is assigned to mode, which will lead to a possible NULL pointer
> dereference on failure of drm_mode_duplicate(). Add a check to avoid
> npd.
>
> Fixes: 6ee738610f41 ("drm/nouveau: Add DRM driver for NVIDIA GPUs")
> Signed-off-by: Ma Ke <make24 at iscas.ac.c...
2024 Jun 28
1
[PATCH v3] drm/nouveau: fix null pointer dereference in nouveau_connector_get_modes
...e this 3
times now.
(...I doubt I'll get a response from Markus, but I certainly want to
make sure they are a bot and not an actual person before removing them
:)
On Thu, 2024-06-27 at 11:02 +0200, Markus Elfring wrote:
> > In nouveau_connector_get_modes(), the return value of
> > drm_mode_duplicate()
> > is assigned to mode, which will lead to a possible NULL pointer
> > dereference on failure of drm_mode_duplicate(). Add a check to
> > avoid npd.
>
> A) Can a wording approach (like the following) be a better change
> description?
>
> ?? A null pointer...
2020 Feb 25
2
[PATCH 04/12] drm: Nuke mode->vrefresh
...panel-boe-himax8279d.c
> > index 74d58ee7d04c..7c27bd5e3486 100644
> > --- a/drivers/gpu/drm/panel/panel-boe-himax8279d.c
> > +++ b/drivers/gpu/drm/panel/panel-boe-himax8279d.c
> > @@ -229,7 +229,7 @@ static int boe_panel_get_modes(struct drm_panel *panel,
> > mode = drm_mode_duplicate(connector->dev, m);
> > if (!mode) {
> > DRM_DEV_ERROR(pinfo->base.dev, "failed to add mode %ux%u@%u\n",
> > - m->hdisplay, m->vdisplay, m->vrefresh);
> > + m->hdisplay, m->vdisplay, drm_mode_vrefresh(m));
> >...
2020 Feb 24
0
[PATCH 04/12] drm: Nuke mode->vrefresh
...b/drivers/gpu/drm/panel/panel-boe-himax8279d.c
> index 74d58ee7d04c..7c27bd5e3486 100644
> --- a/drivers/gpu/drm/panel/panel-boe-himax8279d.c
> +++ b/drivers/gpu/drm/panel/panel-boe-himax8279d.c
> @@ -229,7 +229,7 @@ static int boe_panel_get_modes(struct drm_panel *panel,
> mode = drm_mode_duplicate(connector->dev, m);
> if (!mode) {
> DRM_DEV_ERROR(pinfo->base.dev, "failed to add mode %ux%u@%u\n",
> - m->hdisplay, m->vdisplay, m->vrefresh);
> + m->hdisplay, m->vdisplay, drm_mode_vrefresh(m));
> return -ENOMEM;
> }...
2020 Feb 25
0
[PATCH 04/12] drm: Nuke mode->vrefresh
...8279d.c
>>> index 74d58ee7d04c..7c27bd5e3486 100644
>>> --- a/drivers/gpu/drm/panel/panel-boe-himax8279d.c
>>> +++ b/drivers/gpu/drm/panel/panel-boe-himax8279d.c
>>> @@ -229,7 +229,7 @@ static int boe_panel_get_modes(struct drm_panel *panel,
>>> mode = drm_mode_duplicate(connector->dev, m);
>>> if (!mode) {
>>> DRM_DEV_ERROR(pinfo->base.dev, "failed to add mode %ux%u@%u\n",
>>> - m->hdisplay, m->vdisplay, m->vrefresh);
>>> + m->hdisplay, m->vdisplay, drm_mode_vrefresh(m));...
2017 Jan 17
0
[PATCH 5/6] drm: Delete "mandatory" stereographic modes
...t; ARRAY_SIZE(stereo_mandatory_modes); i++) {
- const struct stereo_mandatory_mode *mandatory;
- struct drm_display_mode *new_mode;
-
- if (!stereo_match_mandatory(mode,
- &stereo_mandatory_modes[i]))
- continue;
-
- mandatory = &stereo_mandatory_modes[i];
- new_mode = drm_mode_duplicate(dev, mode);
- if (!new_mode)
- continue;
-
- new_mode->flags |= mandatory->flags;
- list_add_tail(&new_mode->head, &stereo_modes);
- modes++;
- }
- }
-
- list_splice_tail(&stereo_modes, &connector->probed_modes);
-
- return modes;
-}
-
static int add_hd...
2020 Feb 19
5
[PATCH 04/12] drm: Nuke mode->vrefresh
...el/panel-boe-himax8279d.c b/drivers/gpu/drm/panel/panel-boe-himax8279d.c
index 74d58ee7d04c..7c27bd5e3486 100644
--- a/drivers/gpu/drm/panel/panel-boe-himax8279d.c
+++ b/drivers/gpu/drm/panel/panel-boe-himax8279d.c
@@ -229,7 +229,7 @@ static int boe_panel_get_modes(struct drm_panel *panel,
mode = drm_mode_duplicate(connector->dev, m);
if (!mode) {
DRM_DEV_ERROR(pinfo->base.dev, "failed to add mode %ux%u@%u\n",
- m->hdisplay, m->vdisplay, m->vrefresh);
+ m->hdisplay, m->vdisplay, drm_mode_vrefresh(m));
return -ENOMEM;
}
@@ -262,7 +262,6 @@ static...
2020 Apr 04
0
[PATCH v2 03/17] drm: Nuke mode->vrefresh
...vers/gpu/drm/panel/panel-boe-himax8279d.c
> index 74d58ee7d04c..7c27bd5e3486 100644
> --- a/drivers/gpu/drm/panel/panel-boe-himax8279d.c
> +++ b/drivers/gpu/drm/panel/panel-boe-himax8279d.c
> @@ -229,7 +229,7 @@ static int boe_panel_get_modes(struct drm_panel
> *panel,
> mode = drm_mode_duplicate(connector->dev, m);
> if (!mode) {
> DRM_DEV_ERROR(pinfo->base.dev, "failed to add mode %ux%u@%u\n",
> - m->hdisplay, m->vdisplay, m->vrefresh);
> + m->hdisplay, m->vdisplay, drm_mode_vrefresh(m));
> return -ENOMEM;
> }...
2020 Apr 28
0
[PATCH v3 03/16] drm: Nuke mode->vrefresh
...el/panel-boe-himax8279d.c b/drivers/gpu/drm/panel/panel-boe-himax8279d.c
index 74d58ee7d04c..7c27bd5e3486 100644
--- a/drivers/gpu/drm/panel/panel-boe-himax8279d.c
+++ b/drivers/gpu/drm/panel/panel-boe-himax8279d.c
@@ -229,7 +229,7 @@ static int boe_panel_get_modes(struct drm_panel *panel,
mode = drm_mode_duplicate(connector->dev, m);
if (!mode) {
DRM_DEV_ERROR(pinfo->base.dev, "failed to add mode %ux%u@%u\n",
- m->hdisplay, m->vdisplay, m->vrefresh);
+ m->hdisplay, m->vdisplay, drm_mode_vrefresh(m));
return -ENOMEM;
}
@@ -262,7 +262,6 @@ static...
2020 Apr 03
3
[PATCH v2 03/17] drm: Nuke mode->vrefresh
...el/panel-boe-himax8279d.c b/drivers/gpu/drm/panel/panel-boe-himax8279d.c
index 74d58ee7d04c..7c27bd5e3486 100644
--- a/drivers/gpu/drm/panel/panel-boe-himax8279d.c
+++ b/drivers/gpu/drm/panel/panel-boe-himax8279d.c
@@ -229,7 +229,7 @@ static int boe_panel_get_modes(struct drm_panel *panel,
mode = drm_mode_duplicate(connector->dev, m);
if (!mode) {
DRM_DEV_ERROR(pinfo->base.dev, "failed to add mode %ux%u@%u\n",
- m->hdisplay, m->vdisplay, m->vrefresh);
+ m->hdisplay, m->vdisplay, drm_mode_vrefresh(m));
return -ENOMEM;
}
@@ -262,7 +262,6 @@ static...
2017 Jan 18
2
[PATCH 5/6] drm: Delete "mandatory" stereographic modes
...if (!stereo_match_mandatory(mode,
> - &stereo_mandatory_modes[i]))
> - continue;
> -
> - mandatory = &stereo_mandatory_modes[i];
> - new_mode = drm_mode_duplicate(dev, mode);
> - if (!new_mode)
> - continue;
> -
> - new_mode->flags |= mandatory->flags;
> - list_add_tail(&new_mode->head, &stereo_modes);
> -...