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

(-)file_not_specified_in_diff (-1 / +5 lines)
Line  Link Here
0
-- vmnet-only.orig/driver.c    2005-12-23 18:10:37.000000000 -0500
0
++ vmnet-only/driver.c 2006-01-23 19:21:54.000000000 -0500
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 (+30 lines)
Lines 75-80 Link Here
75
static void VNetUserIfUnsetupNotify(VNetUserIF *userIf);
75
static void VNetUserIfUnsetupNotify(VNetUserIF *userIf);
76
static int  VNetUserIfSetupNotify(VNetUserIF *userIf, VNet_Notify *vn);
76
static int  VNetUserIfSetupNotify(VNetUserIF *userIf, VNet_Notify *vn);
77
77
78
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
79
extern int       skb_copy_datagram(const struct sk_buff *from,
80
                int offset, char __user *to, int size);
81
#endif
82
78
/*
83
/*
79
 *-----------------------------------------------------------------------------
84
 *-----------------------------------------------------------------------------
80
 *
85
 *
Lines 153-164 Link Here
153
static INLINE int
158
static INLINE int
154
VNetUserIfMapUint32Ptr(VA uAddr, struct page **p, uint32 **ptr)
159
VNetUserIfMapUint32Ptr(VA uAddr, struct page **p, uint32 **ptr)
155
{
160
{
161
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14)
162
   if (access_ok(VERIFY_READ, (void *)uAddr, sizeof (uint32)) ||
163
       access_ok(VERIFY_WRITE, (void *)uAddr, sizeof (uint32)) ||
164
       (((uAddr + sizeof(uint32)) & ~(PAGE_SIZE - 1)) != 
165
        (uAddr & ~(PAGE_SIZE - 1)))) {
166
      return -EINVAL;
167
   }
168
#else
156
   if (verify_area(VERIFY_READ, (void *)uAddr, sizeof (uint32)) ||
169
   if (verify_area(VERIFY_READ, (void *)uAddr, sizeof (uint32)) ||
157
       verify_area(VERIFY_WRITE, (void *)uAddr, sizeof (uint32)) ||
170
       verify_area(VERIFY_WRITE, (void *)uAddr, sizeof (uint32)) ||
158
       (((uAddr + sizeof(uint32)) & ~(PAGE_SIZE - 1)) != 
171
       (((uAddr + sizeof(uint32)) & ~(PAGE_SIZE - 1)) != 
159
        (uAddr & ~(PAGE_SIZE - 1)))) {
172
        (uAddr & ~(PAGE_SIZE - 1)))) {
160
      return -EINVAL;
173
      return -EINVAL;
161
   }
174
   }
175
#endif
162
176
163
   *p = UserifLockPage(uAddr);
177
   *p = UserifLockPage(uAddr);
164
   if (*p == NULL) {
178
   if (*p == NULL) {
Lines 932-934 Link Here
932
   *ret = (VNetPort*)userIf;
946
   *ret = (VNetPort*)userIf;
933
   return 0;
947
   return 0;
934
}
948
}
949
950
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
951
/*
952
 *     Copy a datagram to a linear buffer. See
953
 *      http://lkml.org/lkml/2005/1/22/60 for source reference.
954
 */
955
int skb_copy_datagram(const struct sk_buff *skb, int offset, char __user *to, int size)
956
{
957
       struct iovec iov = {
958
               .iov_base = to,
959
               .iov_len =size,
960
       };
961
962
       return skb_copy_datagram_iovec(skb, offset, &iov, size);
963
}
964
#endif

Return to bug 117696