From: Frediano Ziglio <fziglio@redhat.com>
To: fziglio@redhat.com, spice-devel@lists.freedesktop.org,
airlied@linux.ie, dri-devel@lists.freedesktop.org,
airlied@redhat.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 05/11] drm/qxl: Handle all errors in qxl_surface_evict
Date: Wed, 3 Jun 2015 12:09:13 +0100 [thread overview]
Message-ID: <1433329759-10082-6-git-send-email-fziglio@redhat.com> (raw)
In-Reply-To: <1433329759-10082-1-git-send-email-fziglio@redhat.com>
Only EBUSY error was handled. This could cause code to believe
reserve was successful while it failed.
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
---
drivers/gpu/drm/qxl/qxl_cmd.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/qxl/qxl_cmd.c b/drivers/gpu/drm/qxl/qxl_cmd.c
index 85ed5dc..b18f84c 100644
--- a/drivers/gpu/drm/qxl/qxl_cmd.c
+++ b/drivers/gpu/drm/qxl/qxl_cmd.c
@@ -612,8 +612,8 @@ static int qxl_reap_surf(struct qxl_device *qdev, struct qxl_bo *surf, bool stal
int ret;
ret = qxl_bo_reserve(surf, false);
- if (ret == -EBUSY)
- return -EBUSY;
+ if (ret)
+ return ret;
if (stall)
mutex_unlock(&qdev->surf_evict_mutex);
@@ -622,9 +622,9 @@ static int qxl_reap_surf(struct qxl_device *qdev, struct qxl_bo *surf, bool stal
if (stall)
mutex_lock(&qdev->surf_evict_mutex);
- if (ret == -EBUSY) {
+ if (ret) {
qxl_bo_unreserve(surf);
- return -EBUSY;
+ return ret;
}
qxl_surface_evict_locked(qdev, surf, true);
--
2.1.0
_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/spice-devel
next prev parent reply other threads:[~2015-06-03 11:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-03 11:09 [PATCH 00/11 v2] Miscellaneous stability patches Frediano Ziglio
2015-06-03 11:09 ` [PATCH 01/11] drm/qxl: Do not cause spice-server to clean our objects Frediano Ziglio
2015-06-03 11:09 ` [PATCH 02/11] drm/qxl: Do not leak memory if qxl_release_list_add fails Frediano Ziglio
2015-06-03 11:09 ` [PATCH 03/11] drm/qxl: Fix print statement not using uninitialized variable Frediano Ziglio
2015-06-03 11:09 ` [PATCH 04/11] drm/qxl: Avoid double free on error Frediano Ziglio
2015-06-03 11:09 ` Frediano Ziglio [this message]
2015-06-03 11:09 ` [PATCH 06/11] drm/qxl: Fix return for qxl_release_alloc Frediano Ziglio
2015-06-03 11:09 ` [PATCH 07/11] drm/qxl: Handle correctly failures in qxl_alloc_relase_reserved Frediano Ziglio
2015-06-03 11:09 ` [PATCH 08/11] drm/qxl: Remove format string errors Frediano Ziglio
2015-06-03 11:09 ` [PATCH 09/11] drm/qxl: Move main reference counter to GEM object instead of TTM ones Frediano Ziglio
2015-06-03 11:09 ` [PATCH 10/11] drm/qxl: Simplify cleaning qxl processing command Frediano Ziglio
2015-06-03 11:09 ` [PATCH 11/11] drm/qxl: Propagate correctly errors from qxlhw_handle_to_bo Frediano Ziglio
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1433329759-10082-6-git-send-email-fziglio@redhat.com \
--to=fziglio@redhat.com \
--cc=airlied@linux.ie \
--cc=airlied@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=spice-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox