Re: [PATCH net-next v2 1/9] ptp: introduce programmable pins.

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

 



On Mon, Mar 17, 2014 at 09:25:34PM -0400, David Miller wrote:
> 
> This locking seems unnecessarily complex to me.  You should be able to
> do the stateless sanity checks, take the mutex, then do all of the
> rest of the operations until the end of the function before
> dropping the lock.
> 
> So just take the lock once over the operations that need it.

The idea was to avoid holding the mutex when invoking the driver
callbacks (.verify and .enable). Mostly this is my paranoia that some
bad driver will call back into the core via ptp_set_pinfunc().

But you are right that the result is overly complex. I'll make the
callers of ptp_set_pinfunc hold the mutex, and so the set path will
look just like the get path.

Thanks,
Richard
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Discussion]     [TCP Instrumentation]     [Ethernet Bridging]     [Linux Wireless Networking]     [Linux WPAN Networking]     [Linux Host AP]     [Linux WPAN Networking]     [Linux Bluetooth Networking]     [Linux ATH6KL Networking]     [Linux Networking Users]     [Linux Coverity]     [VLAN]     [Git]     [IETF Annouce]     [Linux Assembly]     [Security]     [Bugtraq]     [Yosemite Information]     [MIPS Linux]     [ARM Linux Kernel]     [ARM Linux]     [Linux Virtualization]     [Linux IDE]     [Linux RAID]     [Linux SCSI]