Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 692950 Details for
Bug 906296
BUG: sleeping function called from invalid context at mm/slub.c:925
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Fix
0001-drm-ttm-avoid-allocation-memory-while-spinlock-is-he.patch (text/plain), 2.99 KB, created by
Jérôme Glisse
on 2013-02-04 18:38:49 UTC
(
hide
)
Description:
Fix
Filename:
MIME Type:
Creator:
Jérôme Glisse
Created:
2013-02-04 18:38:49 UTC
Size:
2.99 KB
patch
obsolete
>From ef569b0e251d34e5527a3752e1bd165b6f691450 Mon Sep 17 00:00:00 2001 >From: Jerome Glisse <jglisse@redhat.com> >Date: Mon, 4 Feb 2013 11:27:02 -0500 >Subject: [PATCH] drm/ttm: avoid allocation memory while spinlock is held v2 > >We need to take reference on the sync object while holding the >fence spinlock but at the same time we don't want to allocate >memory while holding the spinlock. This patch make sure we >enforce both of this constraint. > >v2: actually test build it > >Fix https://bugzilla.redhat.com/show_bug.cgi?id=906296 > >Signed-off-by: Jerome Glisse <jglisse@redhat.com> >--- > drivers/gpu/drm/ttm/ttm_bo_util.c | 17 ++++++++++++----- > 1 file changed, 12 insertions(+), 5 deletions(-) > >diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c >index 44420fc..f4b7acd 100644 >--- a/drivers/gpu/drm/ttm/ttm_bo_util.c >+++ b/drivers/gpu/drm/ttm/ttm_bo_util.c >@@ -413,6 +413,8 @@ static void ttm_transfered_destroy(struct ttm_buffer_object *bo) > * @bo: A pointer to a struct ttm_buffer_object. > * @new_obj: A pointer to a pointer to a newly created ttm_buffer_object, > * holding the data of @bo with the old placement. >+ * @sync_obj: the sync object caller is responsible to take a reference on >+ * behalf of this function > * > * This is a utility function that may be called after an accelerated move > * has been scheduled. A new buffer object is created as a placeholder for >@@ -423,11 +425,11 @@ static void ttm_transfered_destroy(struct ttm_buffer_object *bo) > */ > > static int ttm_buffer_object_transfer(struct ttm_buffer_object *bo, >- struct ttm_buffer_object **new_obj) >+ struct ttm_buffer_object **new_obj, >+ void *sync_obj) > { > struct ttm_buffer_object *fbo; > struct ttm_bo_device *bdev = bo->bdev; >- struct ttm_bo_driver *driver = bdev->driver; > > fbo = kzalloc(sizeof(*fbo), GFP_KERNEL); > if (!fbo) >@@ -448,7 +450,8 @@ static int ttm_buffer_object_transfer(struct ttm_buffer_object *bo, > fbo->vm_node = NULL; > atomic_set(&fbo->cpu_writers, 0); > >- fbo->sync_obj = driver->sync_obj_ref(bo->sync_obj); >+ /* reference on sync obj is taken by the caller of this function */ >+ fbo->sync_obj = sync_obj; > kref_init(&fbo->list_kref); > kref_init(&fbo->kref); > fbo->destroy = &ttm_transfered_destroy; >@@ -652,6 +655,8 @@ int ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo, > } > ttm_bo_free_old_node(bo); > } else { >+ void *sync_obj; >+ > /** > * This should help pipeline ordinary buffer moves. > * >@@ -662,12 +667,14 @@ int ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo, > > set_bit(TTM_BO_PRIV_FLAG_MOVING, &bo->priv_flags); > >- /* ttm_buffer_object_transfer accesses bo->sync_obj */ >- ret = ttm_buffer_object_transfer(bo, &ghost_obj); >+ /* take the ref on the sync object before releasing the spinlock */ >+ sync_obj = driver->sync_obj_ref(bo->sync_obj); > spin_unlock(&bdev->fence_lock); >+ > if (tmp_obj) > driver->sync_obj_unref(&tmp_obj); > >+ ret = ttm_buffer_object_transfer(bo, &ghost_obj, sync_obj); > if (ret) > return ret; > >-- >1.7.10.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 906296
:
692871
| 692950