Author: emaste
Date: Wed Oct 12 12:56:18 2016
New Revision: 307145
URL: https://svnweb.freebsd.org/changeset/base/307145

Log:
  Use M_WAITOK in PIO_KEYMAP ioctl
  
  The malloc return value is not checked.
  
  Submitted by: CTurt <ect...@gmail.com>
  MFC after:    1 week

Modified:
  head/sys/dev/kbd/kbd.c

Modified: head/sys/dev/kbd/kbd.c
==============================================================================
--- head/sys/dev/kbd/kbd.c      Wed Oct 12 12:17:41 2016        (r307144)
+++ head/sys/dev/kbd/kbd.c      Wed Oct 12 12:56:18 2016        (r307145)
@@ -888,7 +888,7 @@ genkbd_commonioctl(keyboard_t *kbd, u_lo
        case PIO_KEYMAP:        /* set keyboard translation table */
        case OPIO_KEYMAP:       /* set keyboard translation table (compat) */
 #ifndef KBD_DISABLE_KEYMAP_LOAD
-               mapp = malloc(sizeof *mapp, M_TEMP, M_NOWAIT);
+               mapp = malloc(sizeof *mapp, M_TEMP, M_WAITOK);
                if (cmd == OPIO_KEYMAP) {
                        omapp = (okeymap_t *)arg;
                        mapp->n_keys = omapp->n_keys;
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to