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

Collapse All | Expand All

(-)work/vmnet-only/filter.c (+1 lines)
Lines 18-23 Link Here
18
#include "driver-config.h"
18
#include "driver-config.h"
19
19
20
#include <linux/kernel.h>
20
#include <linux/kernel.h>
21
#include <linux/module.h>
21
#include <linux/version.h>
22
#include <linux/version.h>
22
#include <linux/socket.h>
23
#include <linux/socket.h>
23
#include <linux/if_ether.h>
24
#include <linux/if_ether.h>
(-)work/vmnet-only/kmap_skb.h (+19 lines)
Line 0 Link Here
1
#include <linux/highmem.h>
2
3
static inline void *kmap_skb_frag(const skb_frag_t *frag)
4
{
5
#ifdef CONFIG_HIGHMEM
6
        BUG_ON(in_irq());
7
8
        local_bh_disable();
9
#endif
10
        return kmap_atomic(skb_frag_page(frag), KM_SKB_DATA_SOFTIRQ);
11
}
12
13
static inline void kunmap_skb_frag(void *vaddr)
14
{
15
        kunmap_atomic(vaddr, KM_SKB_DATA_SOFTIRQ);
16
#ifdef CONFIG_HIGHMEM
17
        local_bh_enable();
18
#endif
19
}
(-)work/vmnet-only/netif.c (-1 / +1 lines)
Lines 131-137 Link Here
131
      .ndo_stop = VNetNetifClose,
131
      .ndo_stop = VNetNetifClose,
132
      .ndo_get_stats = VNetNetifGetStats,
132
      .ndo_get_stats = VNetNetifGetStats,
133
      .ndo_set_mac_address = VNetNetifSetMAC,
133
      .ndo_set_mac_address = VNetNetifSetMAC,
134
      .ndo_set_multicast_list = VNetNetifSetMulticast,
134
      .ndo_set_rx_mode = VNetNetifSetMulticast,
135
      /*
135
      /*
136
       * We cannot stuck... If someone will report problems under
136
       * We cannot stuck... If someone will report problems under
137
       * low memory conditions or some such, we should enable it.
137
       * low memory conditions or some such, we should enable it.
(-)work/vmnet-only/userif.c (-3 / +5 lines)
Lines 49-54 Link Here
49
#include "vm_assert.h"
49
#include "vm_assert.h"
50
#include "monitorAction_exported.h"
50
#include "monitorAction_exported.h"
51
51
52
#include "kmap_skb.h"
53
52
typedef struct VNetUserIFStats {
54
typedef struct VNetUserIFStats {
53
   unsigned    read;
55
   unsigned    read;
54
   unsigned    written;
56
   unsigned    written;
Lines 517-526 Link Here
517
	 unsigned int tmpCsum;
519
	 unsigned int tmpCsum;
518
	 const void *vaddr;
520
	 void *vaddr;
519
521
520
	 vaddr = kmap(frag->page);
522
	 vaddr = kmap_skb_frag(frag);
521
	 tmpCsum = csum_and_copy_to_user(vaddr + frag->page_offset,
523
	 tmpCsum = csum_and_copy_to_user(vaddr + frag->page_offset,
522
					 curr, frag->size, 0, &err);
524
					 curr, frag->size, 0, &err);
523
	 kunmap(frag->page);
525
	 kunmap_skb_frag(vaddr);
524
	 if (err) {
526
	 if (err) {
525
	    return err;
527
	    return err;
526
	 }
528
	 }

Return to bug 397733