~n-muench/ubuntu/precise/open-vm-tools/open-vm-tools-precise.sid-merge1

« back to all changes in this revision

Viewing changes to modules/linux/vmhgfs/tcp.c

  • Committer: Bazaar Package Importer
  • Author(s): Serge Hallyn
  • Date: 2011-03-31 14:20:05 UTC
  • mfrom: (1.4.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110331142005-3n9red91p7ogkweo
Tags: 2011.03.28-387002-0ubuntu1
* Merge latest upstream git tag.  This has the unlocked_ioctl change
  needed to fix dkms build failures (LP: #727342)
* Changes in debian/rules:
  - work around a bug in toolbox/Makefile, where install-exec-hook is
    not happening.  This needs to get fixed the right way.
  - don't install 'vmware-user' which seems to no longer exist
  - move /etc/xdg into open-vm-toolbox (which should be done using .install)
* debian/open-vm-tools.init: add 'modprobe [-r] vmblock'. (LP: #332323)
* debian/rules and debian/open-vm-toolbox.lintian-overrides:
  - Make vmware-user-suid-wrapper suid-root (LP: #332323)

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
#include <linux/net.h>
34
34
#include <linux/inet.h>
35
35
#include <linux/errno.h>
 
36
#include <linux/kthread.h>
36
37
 
37
38
#include "compat_kernel.h"
38
 
#include "compat_kthread.h"
39
39
#include "compat_mutex.h"
40
40
#include "compat_version.h"
41
41
#include "compat_sched.h"
406
406
 
407
407
      /* Wait for data to become available */
408
408
      wait_event_interruptible(hgfsRecvThreadWait,
409
 
                  (HgfsSocketIsReceiverIdle() && compat_kthread_should_stop()) ||
 
409
                  (HgfsSocketIsReceiverIdle() && kthread_should_stop()) ||
410
410
                  test_bit(HGFS_REQ_THREAD_RECV, &hgfsRecvThreadFlags));
411
411
 
412
412
      /* Kill yourself if told so. */
413
 
      if (compat_kthread_should_stop()) {
 
413
      if (kthread_should_stop()) {
414
414
         LOG(6, (KERN_DEBUG "VMware hgfs: %s: told to exit\n", __func__));
415
415
         break;
416
416
      }
476
476
   addr.sin_addr.s_addr = in_aton(HOST_IP);
477
477
   addr.sin_port = htons(HOST_PORT);
478
478
 
479
 
   error = compat_sock_create_kern(AF_INET, SOCK_STREAM, IPPROTO_TCP, &socket);
 
479
   error = sock_create_kern(AF_INET, SOCK_STREAM, IPPROTO_TCP, &socket);
480
480
   if (error < 0) {
481
481
      LOG(8, ("%s: sock_create_kern failed: %d.\n", __func__, error));
482
482
      return NULL;
525
525
   addr.svm_cid = VMCI_HOST_CONTEXT_ID;
526
526
   addr.svm_port = HOST_VSOCKET_PORT;
527
527
 
528
 
   error = compat_sock_create_kern(family, SOCK_STREAM, IPPROTO_TCP, &socket);
 
528
   error = sock_create_kern(family, SOCK_STREAM, IPPROTO_TCP, &socket);
529
529
   if (error < 0) {
530
530
      LOG(8, ("%s: sock_create_kern failed: %d.\n", __func__, error));
531
531
      return NULL;
580
580
    * Install the new "data ready" handler that will wake up the
581
581
    * receiving thread.
582
582
    */
583
 
   oldSocketDataReady = xchg(&socket->sk->compat_sk_data_ready,
 
583
   oldSocketDataReady = xchg(&socket->sk->sk_data_ready,
584
584
                             HgfsSocketDataReady);
585
585
 
586
586
   /* Reset receive buffer when a new connection is connected. */
591
591
   LOG(8, ("%s: socket channel connected.\n", __func__));
592
592
 
593
593
   /* Create the recv thread. */
594
 
   recvThread = compat_kthread_run(HgfsSocketReceiveHandler,
595
 
                                   channel, "vmhgfs-rep");
 
594
   recvThread = kthread_run(HgfsSocketReceiveHandler, channel, "vmhgfs-rep");
596
595
   if (IS_ERR(recvThread)) {
597
596
      LOG(4, (KERN_ERR "VMware hgfs: %s: "
598
597
              "failed to create recv thread, err %ld\n",
682
681
{
683
682
   /* Stop the recv thread before we change the channel status. */
684
683
   ASSERT(recvThread != NULL);
685
 
   compat_kthread_stop(recvThread);
 
684
   kthread_stop(recvThread);
686
685
 
687
686
   sock_release(channel->priv);
688
687
   channel->priv = NULL;