Source-Changes-HG archive

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

src: Pull up following revision(s) (requested by msaitoh in tick...



details:   https://anonhg.NetBSD.org/src/rev/45f7455df408
branches:  netbsd-6-1
changeset: 318018:45f7455df408
user:      martin <martin%NetBSD.org@localhost>
date:      Tue Apr 10 11:28:56 2018 +0000
description:
Pull up following revision(s) (requested by msaitoh in ticket #1544):

        sys/arch/amiga/amiga/cc.c: revision 1.27 (patch)

spl leak, found by mootja

diffstat:

 sys/arch/amiga/amiga/cc.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (31 lines):

diff -r 4e4483d2555b -r 45f7455df408 sys/arch/amiga/amiga/cc.c
--- a/sys/arch/amiga/amiga/cc.c Mon Apr 09 13:08:25 2018 +0000
+++ b/sys/arch/amiga/amiga/cc.c Tue Apr 10 11:28:56 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cc.c,v 1.22 2010/12/20 00:25:25 matt Exp $     */
+/*     $NetBSD: cc.c,v 1.22.28.1 2018/04/10 11:28:56 martin Exp $      */
 
 /*
  * Copyright (c) 1994 Christian E. Hopps
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cc.c,v 1.22 2010/12/20 00:25:25 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cc.c,v 1.22.28.1 2018/04/10 11:28:56 martin Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -504,9 +504,10 @@
        while (size > mn->size && mn != (void *)&free_list)
                mn = mn->free_link.cqe_next;
 
-       if (mn == (void *)&free_list)
+       if (mn == (void *)&free_list) {
+               splx(s);
                return(NULL);
-
+       }
        if ((mn->size - size) <= sizeof (*mn)) {
                /*
                 * our allocation would not leave room



Home | Main Index | Thread Index | Old Index