Re: Problem with USB driver using two devices

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

 



On Wed, Nov 23, 2016 at 05:35:45PM +0100, Greg KH wrote:
> On Wed, Nov 23, 2016 at 05:17:35PM +0100, Wolfgang Wilhelm wrote:
> > Thankyou very much for the really fast answer.
> > 
> > I don't get any error messages and I can communicate with
> > the driver for the second device via ioctrl and write functions,
> > i.e. write registers and read registers via the RBUF ioctrl function,
> > only the read function for the second device does not work,
> > i.e. no data is obtained from the mcs6_read function for the
> > second device.
> 
> Hm, let me go look at the driver again, maybe something's odd with it.

I don't see anything odd with your read function, is it just timing out?

Have you tried doing read/writes from userspace with libusb and that
works correctly?

> > Which security problems do you see in the code?
> 
> No checking that the values given to you by userspace are actually valid
> and within "sane" ranges :)

Oh, also your ioctl types need to be better specified than "int" as that
doesn't make much sense with 64bit kernels and a 32bit userspace.  You
need to use types like __u32 in order to make sure that works correctly
in all situations.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux