Re: [PATCH 1/1] Drivers: hv: Implement the file copy service

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 09, 2014 at 09:05:05PM +0000, KY Srinivasan wrote:
> > 
> > We've had this discussion before where you urge me to trust the host...
> 
> I am just implementing the protocol specification given by the host. If I cannot trust the
> specified protocol, I am not sure what else can be done here.

I'm sorry I got too upset and we're not communicating correctly.

Anyway, looking at the code, there is actually locking in
process_chn_event() which protect ->fcopy_context.  It's still sucky to
only store the last message in the queue but that's ok.

+static int fcopy_handle_handshake(int op)
+{
+       int ret = 1;
+
+       pr_info("FCP: user-mode registering done.\n");
+       fcopy_transaction.active = false;
+       set_channel_read_state((struct vmbus_channel *)
+                               fcopy_transaction.fcopy_context,
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Dereferenced inside the call to set_channel_read_state()

+                               true);
+
+       if (fcopy_transaction.fcopy_context)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Checked for NULL.

+               hv_fcopy_onchannelcallback(fcopy_transaction.fcopy_context);
+
+       in_hand_shake = false;
+       return ret;
+}

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux