Merge 3.7-rc3 into char-misc-next
Greg Kroah-Hartman [Mon, 29 Oct 2012 15:44:40 +0000 (08:44 -0700)]
This brings in the various 3.7-rc3 char fixes into char-misc-next.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

1  2 
drivers/hv/channel.c

diff --combined drivers/hv/channel.c
  #define NUM_PAGES_SPANNED(addr, len) \
  ((PAGE_ALIGN(addr + len) >> PAGE_SHIFT) - (addr >> PAGE_SHIFT))
  
 -/* Internal routines */
 -static int create_gpadl_header(
 -      void *kbuffer,  /* must be phys and virt contiguous */
 -      u32 size,       /* page-size multiple */
 -      struct vmbus_channel_msginfo **msginfo,
 -      u32 *messagecount);
 -static void vmbus_setevent(struct vmbus_channel *channel);
 -
  /*
   * vmbus_setevent- Trigger an event notification on the specified
   * channel.
@@@ -138,14 -146,14 +138,14 @@@ int vmbus_open(struct vmbus_channel *ne
  
        if (ret != 0) {
                err = ret;
-               goto errorout;
+               goto error0;
        }
  
        ret = hv_ringbuffer_init(
                &newchannel->inbound, in, recv_ringbuffer_size);
        if (ret != 0) {
                err = ret;
-               goto errorout;
+               goto error0;
        }
  
  
  
        if (ret != 0) {
                err = ret;
-               goto errorout;
+               goto error0;
        }
  
        /* Create and init the channel open message */
                           GFP_KERNEL);
        if (!open_info) {
                err = -ENOMEM;
-               goto errorout;
+               goto error0;
        }
  
        init_completion(&open_info->waitevent);
  
        if (userdatalen > MAX_USER_DEFINED_BYTES) {
                err = -EINVAL;
-               goto errorout;
+               goto error0;
        }
  
        if (userdatalen)
                               sizeof(struct vmbus_channel_open_channel));
  
        if (ret != 0)
-               goto cleanup;
+               goto error1;
  
        t = wait_for_completion_timeout(&open_info->waitevent, 5*HZ);
        if (t == 0) {
                err = -ETIMEDOUT;
-               goto errorout;
+               goto error1;
        }
  
  
        if (open_info->response.open_result.status)
                err = open_info->response.open_result.status;
  
- cleanup:
        spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags);
        list_del(&open_info->msglistentry);
        spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags);
        kfree(open_info);
        return err;
  
- errorout:
-       hv_ringbuffer_cleanup(&newchannel->outbound);
-       hv_ringbuffer_cleanup(&newchannel->inbound);
+ error1:
+       spin_lock_irqsave(&vmbus_connection.channelmsg_lock, flags);
+       list_del(&open_info->msglistentry);
+       spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags);
+ error0:
        free_pages((unsigned long)out,
                get_order(send_ringbuffer_size + recv_ringbuffer_size));
        kfree(open_info);