]> jspc29.x-matter.uni-frankfurt.de Git - trbnettools.git/commitdiff
bubfix in pexor_read regarding dma.size()
authorhadaq <hadaq>
Thu, 8 Mar 2012 23:34:15 +0000 (23:34 +0000)
committerhadaq <hadaq>
Thu, 8 Mar 2012 23:34:15 +0000 (23:34 +0000)
pexor/kernel-module/pexor_trb.c

index 607542f3465212a1be6f064aaec6602654b66a89..27b03e04438a76a8deffdf50770abccd7d56bb42 100644 (file)
@@ -670,9 +670,9 @@ ssize_t pexor_read(struct file * filp,
   if (privdata == NULL) {
     return -EFAULT;
   }
-  if (count > privdata->dma.size) {
+  if (count > privdata->dma.size * PAGE_SIZE) {
     pexor_msg(KERN_ERR "ERROR> pexor_read: requested count (%d) > Max: %d\n", 
-              (int)count, (int)privdata->dma.size);
+              (int)(count / 4), (int)privdata->dma.size);
     return -EFAULT;
   }
   if (count > pexor_read_buffer_ctr) {