[gregkh@xxxxxxxxxxxxxxxxxxx: Patch "drm: re-enable error handling" has been added to the 3.18-stable tree]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi !

this is also the wrong version of the patch - the proper version is
below. This has been posted to lkml https://lkml.org/lkml/2018/7/18/191
"[PATCH V3] drm: handle error values properly" but there was no review yet
The version you have here though is for sure broken. So maybe this should
be simply dropped until the above, presumably correct fix, is confirmed.

thx!
hofrat

----- Forwarded message from gregkh@xxxxxxxxxxxxxxxxxxx -----

Date: Tue, 28 Aug 2018 16:09:59 +0200
From: gregkh@xxxxxxxxxxxxxxxxxxx
To: 1531571532-22733-1-git-send-email-hofrat@xxxxxxxxx, alexander.levin@xxxxxxxxxxxxx, gregkh@xxxxxxxxxxxxxxxxxxx, hofrat@xxxxxxxxx,
	seanpaul@xxxxxxxxxxxx
Cc: stable-commits@xxxxxxxxxxxxxxx
Subject: Patch "drm: re-enable error handling" has been added to the 3.18-stable tree


This is a note to let you know that I've just added the patch titled

    drm: re-enable error handling

to the 3.18-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-re-enable-error-handling.patch
and it can be found in the queue-3.18 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From foo@baz Tue Aug 28 16:08:28 CEST 2018
From: Nicholas Mc Guire <hofrat@xxxxxxxxx>
Date: Sat, 14 Jul 2018 14:32:12 +0200
Subject: drm: re-enable error handling

From: Nicholas Mc Guire <hofrat@xxxxxxxxx>

[ Upstream commit d530b5f1ca0bb66958a2b714bebe40a1248b9c15 ]

drm_legacy_ctxbitmap_next() returns idr_alloc() which can return
-ENOMEM, -EINVAL or -ENOSPC none of which are -1 . but the call sites
of drm_legacy_ctxbitmap_next() seem to be assuming that the error case
would be -1 (original return of drm_ctxbitmap_next() prior to 2.6.23
was actually -1). Thus reenable error handling by checking for < 0.

Signed-off-by: Nicholas Mc Guire <hofrat@xxxxxxxxx>
Fixes: 62968144e673 ("drm: convert drm context code to use Linux idr")
Signed-off-by: Sean Paul <seanpaul@xxxxxxxxxxxx>
Link: https://patchwork.freedesktop.org/patch/msgid/1531571532-22733-1-git-send-email-hofrat@xxxxxxxxx
Signed-off-by: Sasha Levin <alexander.levin@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/gpu/drm/drm_context.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/gpu/drm/drm_context.c
+++ b/drivers/gpu/drm/drm_context.c
@@ -341,7 +341,7 @@ int drm_legacy_addctx(struct drm_device
 		ctx->handle = drm_legacy_ctxbitmap_next(dev);
 	}
 	DRM_DEBUG("%d\n", ctx->handle);
-	if (ctx->handle == -1) {
+	if (ctx->handle < 0) {
 		DRM_DEBUG("Not enough free contexts.\n");
 		/* Should this return -EBUSY instead? */
 		return -ENOMEM;


Patches currently in stable-queue which might be from hofrat@xxxxxxxxx are

queue-3.18/drm-re-enable-error-handling.patch
queue-3.18/can-mpc5xxx_can-check-of_iomap-return-before-use.patch

----- End forwarded message -----



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux