Author: kib
Date: Fri Mar 25 11:05:28 2011
New Revision: 219987
URL: http://svn.freebsd.org/changeset/base/219987

Log:
  Remove unneccessary panics, that can be easily triggered by user.
  The copyin() function handles NULL as well as any other pointer.
  
  MFC after:    3 days

Modified:
  head/sys/compat/freebsd32/freebsd32_ioctl.c

Modified: head/sys/compat/freebsd32/freebsd32_ioctl.c
==============================================================================
--- head/sys/compat/freebsd32/freebsd32_ioctl.c Fri Mar 25 10:57:57 2011        
(r219986)
+++ head/sys/compat/freebsd32/freebsd32_ioctl.c Fri Mar 25 11:05:28 2011        
(r219987)
@@ -66,8 +66,6 @@ freebsd32_ioctl_md(struct thread *td, st
        u_long com = 0;
        int error;
 
-       if (uap->data == NULL)
-               panic("%s: where is my ioctl data??", __func__);
        if (uap->com & IOC_IN) {
                if ((error = copyin(uap->data, &md32, sizeof(md32)))) {
                        return (error);
@@ -132,9 +130,6 @@ freebsd32_ioctl_ioc_toc_header(struct th
        struct ioc_toc_header32 toch32;
        int error;
 
-       if (uap->data == NULL)
-               panic("%s: where is my ioctl data??", __func__);
-
        if ((error = copyin(uap->data, &toch32, sizeof(toch32))))
                return (error);
        CP(toch32, toch, len);
@@ -154,9 +149,6 @@ freebsd32_ioctl_ioc_read_toc(struct thre
        struct ioc_read_toc_entry32 toce32;
        int error;
 
-       if (uap->data == NULL)
-               panic("%s: where is my ioctl data??", __func__);
-
        if ((error = copyin(uap->data, &toce32, sizeof(toce32))))
                return (error);
        CP(toce32, toce, address_format);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to