Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 117696 | Differences between
and this patch

Collapse All | Expand All

(-)vmnet-only.orig/driver.c (+4 lines)
Lines 1393-1399 Link Here
1393
      return FALSE;
1393
      return FALSE;
1394
   }
1394
   }
1395
   
1395
   
1396
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14)
1397
   for (fd = 0; fd < p->files->fdt->max_fds; fd++) {
1398
#else
1396
   for (fd = 0; fd < p->files->max_fds; fd++) {
1399
   for (fd = 0; fd < p->files->max_fds; fd++) {
1400
#endif
1397
#ifdef KERNEL_2_3_99
1401
#ifdef KERNEL_2_3_99
1398
      file = fcheck_files(p->files, fd);
1402
      file = fcheck_files(p->files, fd);
1399
#else
1403
#else
(-)vmnet-only.orig/userif.c (-2 / +11 lines)
Lines 153-164 Link Here
153
static INLINE int
153
static INLINE int
154
VNetUserIfMapUint32Ptr(VA uAddr, struct page **p, uint32 **ptr)
154
VNetUserIfMapUint32Ptr(VA uAddr, struct page **p, uint32 **ptr)
155
{
155
{
156
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14)
157
   if (access_ok(VERIFY_READ, (void *)uAddr, sizeof (uint32)) ||
158
       access_ok(VERIFY_WRITE, (void *)uAddr, sizeof (uint32)) ||
159
       (((uAddr + sizeof(uint32)) & ~(PAGE_SIZE - 1)) != 
160
        (uAddr & ~(PAGE_SIZE - 1)))) {
161
      return -EINVAL;
162
   }
163
#else
156
   if (verify_area(VERIFY_READ, (void *)uAddr, sizeof (uint32)) ||
164
   if (verify_area(VERIFY_READ, (void *)uAddr, sizeof (uint32)) ||
157
       verify_area(VERIFY_WRITE, (void *)uAddr, sizeof (uint32)) ||
165
       verify_area(VERIFY_WRITE, (void *)uAddr, sizeof (uint32)) ||
158
       (((uAddr + sizeof(uint32)) & ~(PAGE_SIZE - 1)) != 
166
       (((uAddr + sizeof(uint32)) & ~(PAGE_SIZE - 1)) != 
159
        (uAddr & ~(PAGE_SIZE - 1)))) {
167
        (uAddr & ~(PAGE_SIZE - 1)))) {
160
      return -EINVAL;
168
      return -EINVAL;
161
   }
169
   }
170
#endif
162
171
163
   *p = UserifLockPage(uAddr);
172
   *p = UserifLockPage(uAddr);
164
   if (*p == NULL) {
173
   if (*p == NULL) {
Lines 560-566 Link Here
560
      u_int16_t csum16;
569
      u_int16_t csum16;
561
      
570
      
562
      skl = skb->h.raw - skb->data;
571
      skl = skb->h.raw - skb->data;
563
      if (skb_copy_datagram(skb, 0, buf, skl)) {
572
      if (skb_copy_datagram_iovec(skb, 0, buf, skl)) {
564
	 return -EFAULT;
573
	 return -EFAULT;
565
      }
574
      }
566
      csum = VNetCsumCopyDatagram(skb, skl, buf + skl);
575
      csum = VNetCsumCopyDatagram(skb, skl, buf + skl);
Lines 572-578 Link Here
572
	 return -EFAULT;
581
	 return -EFAULT;
573
      }
582
      }
574
   } else {
583
   } else {
575
      if (skb_copy_datagram(skb, 0, buf, count)) {
584
      if (skb_copy_datagram_iovec(skb, 0, buf, count)) {
576
	 return -EFAULT;
585
	 return -EFAULT;
577
      }
586
      }
578
   }
587
   }

Return to bug 117696