]> git.saurik.com Git - apple/xnu.git/blobdiff - iokit/Kernel/IOStatistics.cpp
xnu-4570.61.1.tar.gz
[apple/xnu.git] / iokit / Kernel / IOStatistics.cpp
index 6e72eb49592685df4e862d305f39db7ff9e60293..f3771602a03c174a6316689a1e9b3857719336ae 100644 (file)
@@ -27,6 +27,7 @@
  */
 
 #include <sys/sysctl.h>
+#include <kern/backtrace.h>
 #include <kern/host.h>
 #include <kern/zalloc.h>
 
@@ -814,8 +815,11 @@ int IOStatistics::getUserClientStatistics(sysctl_req *req)
                goto exit;
        }
 
-       SYSCTL_IN(req, &requestedLoadTag, sizeof(requestedLoadTag));
-       
+       error = SYSCTL_IN(req, &requestedLoadTag, sizeof(requestedLoadTag));
+       if (error) {
+               goto exit;
+       }
+
        LOG(2, "IOStatistics::getUserClientStatistics - requesting kext w/load tag: %d\n", requestedLoadTag);
 
        buffer = (char*)kalloc(calculatedSize);
@@ -1221,7 +1225,7 @@ KextNode *IOStatistics::getKextNodeFromBacktrace(boolean_t write) {
         * overhead. OSBacktrace does many safety checks that
         * are not needed in this situation.
         */
-       btCount = fastbacktrace((uintptr_t*)bt, btCount);
+       btCount = backtrace((uintptr_t*)bt, btCount);
 
        if (write) {
                IORWLockWrite(lock);