The result of drm_property_create_blob() is not checked for success
which could lead to a NULL pointer dereference.
I was led to this by a smatch warning:
drivers/gpu/drm/drm_crtc.c:3186 drm_mode_connector_update_edid_property() error: potential null dereference 'connector->edid_blob_ptr'. (drm_property_create_blob returns null)
drm_property_create_blob() calls kzalloc() which can return NULL.
Cc: David Airlie <airlied(a)linux.ie>
Cc: dri-devel(a)lists.freedesktop.org
Cc: stable(a)…
[View More]vger.kernel.org # 3.0+
Signed-off-by: Tim Gardner <tim.gardner(a)canonical.com>
---
This bug actually exists in the original commit f453ba0460742ad027ae0c4c7d61e62817b3e7ef
(2.6.29), but I only checked as far back as 3.0 for stable.
drivers/gpu/drm/drm_crtc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index ef1b221..31872ba 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -3180,6 +3180,10 @@ int drm_mode_connector_update_edid_property(struct drm_connector *connector,
size = EDID_LENGTH * (1 + edid->extensions);
connector->edid_blob_ptr = drm_property_create_blob(connector->dev,
size, edid);
+ if (!connector->edid_blob_ptr) {
+ pr_err("drm: Could not allocate %d edid blob bytes.\n", size);
+ return -ENOMEM;
+ }
ret = drm_connector_property_set_value(connector,
dev->mode_config.edid_property,
--
1.7.9.5
[View Less]
With all the previous patches there shouldn't be anything lying on the reservations being atomic
with removal of the bo's from the lru lists any more.
As such we can finally fix the locking primitives and make it act like normal mutex calls.
Patch 1 is the actual removal of the guarantee in ttm_bo_reserve
patch 2 is a cleanup of ttm_eu_backoff_reservation from removing that guarantee
patch 3...6 are introducing ttm_bo_reserve_slowpath.
After this series, this should directly map to my …
[View More]proposed extensions to mutex.
[View Less]
As the shrinker may be invoked for the allocation, and it may reap
neighbouring objects in the offset range mm, we need to be careful in
the order in which we allocate the node, search for free space and then
insert the node into the mmap offset range manager.
Signed-off-by: Chris Wilson <chris(a)chris-wilson.co.uk>
Cc: Dave Airlie <airlied(a)redhat.com>
Cc: dri-devel(a)lists.freedesktop.org
---
drivers/gpu/drm/drm_gem.c | 18 ++++++++----------
1 file changed, 8 insertions(+), …
[View More]10 deletions(-)
diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
index 24efae4..3a2d594 100644
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -353,19 +353,17 @@ drm_gem_create_mmap_offset(struct drm_gem_object *obj)
map->handle = obj;
/* Get a DRM GEM mmap offset allocated... */
- list->file_offset_node = drm_mm_search_free(&mm->offset_manager,
- obj->size / PAGE_SIZE, 0, false);
-
- if (!list->file_offset_node) {
- DRM_ERROR("failed to allocate offset for bo %d\n", obj->name);
- ret = -ENOSPC;
+ list->file_offset_node = kzalloc(sizeof(struct drm_mm_node), GFP_KERNEL);
+ if (list->file_offset_node == NULL) {
+ ret = -ENOMEM;
goto out_free_list;
}
- list->file_offset_node = drm_mm_get_block(list->file_offset_node,
- obj->size / PAGE_SIZE, 0);
- if (!list->file_offset_node) {
- ret = -ENOMEM;
+ ret = drm_mm_insert_node(&mm->offset_manager, list->file_offset_node,
+ obj->size / PAGE_SIZE, 0);
+ if (ret) {
+ DRM_ERROR("failed to allocate offset for bo\n");
+ kfree(list->file_offset_node);
goto out_free_list;
}
--
1.7.10.4
[View Less]
https://bugs.freedesktop.org/show_bug.cgi?id=35446
Summary: Problem with Blender and big textures
Product: Mesa
Version: git
Platform: x86-64 (AMD64)
OS/Version: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/Gallium/r300
AssignedTo: dri-devel(a)lists.freedesktop.org
ReportedBy: disnel(a)disnel.com
When I try to use a big texture (4096x4096) in blender 2.…
[View More]56beta, I get
following error:
r300: CS space validation failed. (not enough memory?) Skipping rendering.
and no texture is displayed. Smaller textures (tested 2048x2048) works fine.
Also with LIBGL_ALWAYS_SOFTWARE=1 it works fine. When I try bigger texture
(8000x6048), I get no error, but also no texture and I can see screen
corruption with Compiz (bad window shadows, applets on panel, background on 2nd
display etc).
Blender files with textures and image with corrupted display are here
http://devel.disnel.com/tmp/
(I dont'know, how big files can I attach here). I'am using mesa
7.11.0-git2011016+gallium from xorg-edgers with Ubuntu 10.10 x86_64. My
graphics card is Radeon X1400.
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
[View Less]
https://bugs.freedesktop.org/show_bug.cgi?id=30401
Summary: starting programs with Qt 4.7 opengl es2
graphicssystem fail
Product: Mesa
Version: git
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/Gallium/r300
AssignedTo: dri-devel(a)lists.freedesktop.org
ReportedBy: martinstolpe(a)gmail.com
I've compiled Qt 4.7 with …
[View More]the opengl es2 backend. When I try to start for
example dolphin with the opengl engine:
okular -graphicssystem=opengl
it fails with the following error:
okular: symbol lookup error: /usr/lib/egl/egl_gallium.so: undefined symbol:
drmGetMagic
Card is a X1400 in T60 notebook.
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
[View Less]
https://bugs.freedesktop.org/show_bug.cgi?id=42009
Bug #: 42009
Summary: audio stutters with xorg state tracker and 2D
acceleration enabled
Classification: Unclassified
Product: Mesa
Version: git
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/Gallium/r300
AssignedTo: dri-devel(a)lists.freedesktop.org
…
[View More]ReportedBy: martinstolpe(a)gmail.com
Created attachment 52543
--> https://bugs.freedesktop.org/attachment.cgi?id=52543
perf output when 2D acceleration is disabled
Audio output of flashplayer stutters massively when 2D acceleration is enabled.
It's much better when 2D acceleration is disabled. When 2D acceleration is
disabled the audio stutters when switching between tabs/windows.
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
[View Less]