Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core nouveau: fi...



details:   https://anonhg.NetBSD.org/src/rev/017a37ce26cb
branches:  trunk
changeset: 1028996:017a37ce26cb
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 12:40:21 2021 +0000

description:
nouveau: fix a "can return -1 to userland" problem.

nvkm_ioctl_del() for some reason converts 0 into 1 return.  this
appears to be a way to avoid having a log printed by nvkm_ioctl()
and to trigger some dead code ("hack" is always NULL afaict.)
after consuming this value convert it back to 0 for ioctl return.


Author: phone <mrg%NetBSD.org@localhost>
Committer: Taylor R Campbell <riastradh%NetBSD.org@localhost>

diffstat:

 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_ioctl.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r dd44e21a5bdd -r 017a37ce26cb sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_ioctl.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_ioctl.c        Sun Dec 19 12:40:11 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/core/nouveau_nvkm_core_ioctl.c        Sun Dec 19 12:40:21 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nouveau_nvkm_core_ioctl.c,v 1.6 2021/12/19 10:51:57 riastradh Exp $    */
+/*     $NetBSD: nouveau_nvkm_core_ioctl.c,v 1.7 2021/12/19 12:40:21 riastradh Exp $    */
 
 /*
  * Copyright 2014 Red Hat Inc.
@@ -24,7 +24,7 @@
  * Authors: Ben Skeggs <bskeggs%redhat.com@localhost>
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_core_ioctl.c,v 1.6 2021/12/19 10:51:57 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_core_ioctl.c,v 1.7 2021/12/19 12:40:21 riastradh Exp $");
 
 #include <core/ioctl.h>
 #include <core/client.h>
@@ -487,6 +487,10 @@
                        client->data = NULL;
                }
        }
+#ifdef __NetBSD__
+       else
+               ret = 0;
+#endif
 
        return ret;
 }



Home | Main Index | Thread Index | Old Index