Re: [patch] staging: line6: add bounds check in snd_toneport_source_put()

2013-09-13 Thread Stefan Hajnoczi
On Fri, Sep 13, 2013 at 10:07 AM, Dan Carpenter wrote: > "source" comes from the user in snd_ctl_elem_write() so it needs to be > checked. > > Signed-off-by: Dan Carpenter Reviewed-by: Stefan Hajnoczi ___ devel mailing list de...@linuxdriverproject.or

RE: [PATCH 00/13] hv: clean up dev_attr usage

2013-09-13 Thread KY Srinivasan
> -Original Message- > From: Greg Kroah-Hartman [mailto:gre...@linuxfoundation.org] > Sent: Friday, September 13, 2013 11:33 AM > To: KY Srinivasan; Haiyang Zhang > Cc: de...@linuxdriverproject.org; linux-ker...@vger.kernel.org > Subject: [PATCH 00/13] hv: clean up dev_attr usage > > Hi,

[PATCH 09/13] hv: move "client/server_monitor_latency" bus attributes to dev_groups

2013-09-13 Thread Greg Kroah-Hartman
This moves the "client_monitor_latency" and "server_monitor_latency" bus attributes to the dev_groups structure, removing the need for it to be in a temporary structure. Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Signed-off-by: Greg Kroah-Hartman --- drivers/hv/channel.c | 4 drivers/hv/

[PATCH 03/13] hv: move "monitor_id" bus attribute to dev_groups

2013-09-13 Thread Greg Kroah-Hartman
This moves the "state" bus attribute to the dev_groups structure, removing the need for it to be in a temporary structure. Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Signed-off-by: Greg Kroah-Hartman --- drivers/hv/channel.c | 2 -- drivers/hv/vmbus_drv.c | 18 -- include/linu

[PATCH 01/13] hv: use dev_groups for device attributes

2013-09-13 Thread Greg Kroah-Hartman
This patch is the first in a series that moves the hv bus code to use the dev_groups field instead of dev_attrs, as dev_attrs is going away in future kernel releases. It moves the id sysfs file to the dev_groups structure, and creates the needed show/store functions, instead of relying on one "uni

[PATCH 00/13] hv: clean up dev_attr usage

2013-09-13 Thread Greg Kroah-Hartman
Hi, Here's a set of 13 patches to get rid of the dev_attrs use in the hv bus code, as it will be going away soon. It's _way_ bigger than all other conversions I've had to do so far in the kernel, as you were using a "multiplexor" function for all of these files. So, I've broken it up into indivi

[PATCH 07/13] hv: make "monitor_pages" a "real" pointer array

2013-09-13 Thread Greg Kroah-Hartman
monitor_pages was a void pointer, containing an unknown number of arrays that we just "knew" were a child and parent array of a specific size. Instead of that implicit knowledge, let's make them a real pointer, allowing us to have type safety, and a semblance of sane addressing schemes. Cc: "K. Y

[PATCH 05/13] hv: move "class_id" bus attribute to dev_groups

2013-09-13 Thread Greg Kroah-Hartman
This moves the "class_id" bus attribute to the dev_groups structure, removing the need for it to be in a temporary structure. Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Signed-off-by: Greg Kroah-Hartman --- drivers/hv/channel.c | 2 -- drivers/hv/vmbus_drv.c | 22 +++--- inclu

[PATCH 10/13] hv: move "client/server_monitor_conn_id" bus attributes to dev_groups

2013-09-13 Thread Greg Kroah-Hartman
This moves the "client_monitor_conn_id" and "server_monitor_conn_id" bus attributes to the dev_groups structure, removing the need for it to be in a temporary structure. Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Signed-off-by: Greg Kroah-Hartman --- drivers/hv/channel.c | 14 - dr

[PATCH 04/13] hv: move "modalias" bus attribute to dev_groups

2013-09-13 Thread Greg Kroah-Hartman
This moves the "state" bus attribute to the dev_groups structure. Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Signed-off-by: Greg Kroah-Hartman --- drivers/hv/vmbus_drv.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmb

[PATCH 12/13] hv: delete struct hv_dev_port_info

2013-09-13 Thread Greg Kroah-Hartman
It's no longer needed, and the struct hv_ring_buffer_debug_info structure shouldn't be "global" so move it to the local .h file instead. Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Signed-off-by: Greg Kroah-Hartman --- drivers/hv/hyperv_vmbus.h | 7 +++ drivers/hv/vmbus_drv.c| 35 ++

[PATCH 06/13] hv: move "device_id" bus attribute to dev_groups

2013-09-13 Thread Greg Kroah-Hartman
This moves the "device_id" bus attribute to the dev_groups structure, removing the need for it to be in a temporary structure. Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Signed-off-by: Greg Kroah-Hartman --- drivers/hv/channel.c | 4 drivers/hv/vmbus_drv.c | 24 ++--

[PATCH 13/13] hv: move ringbuffer bus attributes to dev_groups

2013-09-13 Thread Greg Kroah-Hartman
This moves the ringbuffer bus attributes to the dev_groups structure, deletes the now unneeded struct hv_device_info, and removes some now unused functions, and variables as everything is now moved to the dev_groups structure, dev_attrs is no longer needed. Cc: "K. Y. Srinivasan" Cc: Haiyang Zhan

[PATCH 08/13] hv: move "client/server_monitor_pending" bus attributes to dev_groups

2013-09-13 Thread Greg Kroah-Hartman
This moves the "client_monitor_pending" and "server_monitor_pending" bus attributes to the dev_groups structure, removing the need for it to be in a temporary structure. Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Signed-off-by: Greg Kroah-Hartman --- drivers/hv/channel.c | 4 drivers/hv/

[PATCH 02/13] hv: move "state" bus attribute to dev_groups

2013-09-13 Thread Greg Kroah-Hartman
This moves the "state" bus attribute to the dev_groups structure, removing the need for it to be in a temporary structure. Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Signed-off-by: Greg Kroah-Hartman --- drivers/hv/channel.c | 1 - drivers/hv/vmbus_drv.c | 17 - include/linux/

[PATCH 11/13] hv: delete vmbus_get_debug_info()

2013-09-13 Thread Greg Kroah-Hartman
It's only used once, only contains 2 function calls, so just make those calls directly, deleting the function, and the now unneeded structure entirely. Cc: "K. Y. Srinivasan" Cc: Haiyang Zhang Signed-off-by: Greg Kroah-Hartman --- drivers/hv/channel.c | 10 -- drivers/hv/vmbus_drv.c

[PATCH] Staging: lustre: remove unnecessary braces

2013-09-13 Thread Jon Bernard
This is a patch to the lvfs_lib.c file that removes unnecessary braces from an if statement found by the checkpatch.pl tool. Signed-off-by: Jon Bernard --- drivers/staging/lustre/lustre/lvfs/lvfs_lib.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lustr

[PATCH] staging: dgnc: Fix typo in staging/dgnc

2013-09-13 Thread Masanari Iida
Correct spelling typo in comments Signed-off-by: Masanari Iida --- drivers/staging/dgnc/dgnc_driver.h | 2 +- drivers/staging/dgnc/dgnc_neo.c| 2 +- drivers/staging/dgnc/dgnc_neo.h| 2 +- drivers/staging/dgnc/dgnc_tty.c| 4 ++-- drivers/staging/dgnc/digi.h| 4 ++-- 5 files ch

Re: [PATCH 0/4] Hyper-V TRIM support

2013-09-13 Thread Douglas Gilbert
On 13-09-13 08:58 AM, Andy Whitcroft wrote: tl;dr -- enable TRIM support for Hyper-V emulated disks. The Hyper-V hypervisor can support TRIM for its devices, advertising this via the appropriate VPD pages. However the emulated disks only claim to be SPC-2 devices. According to the specs VPD pa

Re: [PATCH 0/4] Hyper-V TRIM support

2013-09-13 Thread Andy Whitcroft
On Fri, Sep 13, 2013 at 07:57:58AM -0700, James Bottomley wrote: > This is an awful lot of contortions (which don't seem to have any other > users on the horizon) to support a device that's not standards > compliant. What about this, it's simple, it does the right thing and > it's contained in th

[PATCH] staging: dgap: Fix typo in staging/dgap

2013-09-13 Thread Masanari Iida
Correct spelling typo in comments. Signed-off-by: Masanari Iida --- drivers/staging/dgap/dgap_downld.h | 2 +- drivers/staging/dgap/dgap_driver.h | 2 +- drivers/staging/dgap/dgap_fep5.h | 2 +- drivers/staging/dgap/dgap_parse.c | 4 ++-- drivers/staging/dgap/dgap_tty.c| 4 ++-- drivers/s

[PATCH] staging: rtl8712: re-use native mac_pton() helper

2013-09-13 Thread Andy Shevchenko
There is a nice helper to parse MAC. Let's use it and remove custom implementation. Signed-off-by: Andy Shevchenko --- drivers/staging/rtl8712/usb_intf.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/staging/rtl8712/usb_intf.c b/drivers/staging/rtl

Re: [PATCH 0/4] Hyper-V TRIM support

2013-09-13 Thread James Bottomley
On Fri, 2013-09-13 at 13:58 +0100, Andy Whitcroft wrote: > tl;dr -- enable TRIM support for Hyper-V emulated disks. > > The Hyper-V hypervisor can support TRIM for its devices, advertising this > via the appropriate VPD pages. However the emulated disks only claim > to be SPC-2 devices. Accordin

RE: [PATCH V2 1/1] X86: Hyper-V: Get the local APIC timer frequency from the hypervisor

2013-09-13 Thread KY Srinivasan
> -Original Message- > From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Thursday, September 12, 2013 11:39 PM > To: KY Srinivasan; H. Peter Anvin > Cc: o...@aepfle.de; b...@alien8.de; a...@canonical.com; x...@kernel.org; > t...@linutronix.de; de...@linuxdriverproject.org; gre...@linux

[PATCH 1/4] scsi: add scsi device flag to request VPD pages be used at SPC-2

2013-09-13 Thread Andy Whitcroft
Under Hyper-V the disk devices support the trim extensions advertising them via the appropriate VPD pages, it however reports itself as SPC-2 only. The relevant pages were added in SPC-3 and later, so we do not even attempt to see if they are present; the VPD page 0 lists which other pages are pres

RE: [PATCH V2 1/1] X86: Hyper-V: Get the local APIC timer frequency from the hypervisor

2013-09-13 Thread KY Srinivasan
> -Original Message- > From: Gleb Natapov [mailto:g...@redhat.com] > Sent: Friday, September 13, 2013 2:55 AM > To: KY Srinivasan > Cc: H. Peter Anvin; x...@kernel.org; gre...@linuxfoundation.org; linux- > ker...@vger.kernel.org; de...@linuxdriverproject.org; o...@aepfle.de; > a...@canoni

[PATCH] staging: dwc2: Fix typo in staging/dwc2

2013-09-13 Thread Masanari Iida
Correct spelling typo in comments Singend-off-by: Masanari Iida --- drivers/staging/dwc2/core.c | 2 +- drivers/staging/dwc2/hcd_queue.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/dwc2/core.c b/drivers/staging/dwc2/core.c index 06dae67..8dbd174

[PATCH 4/4] scsi: hyper-v storage -- mark as preferring READ CAPACITY (16) at SPC-2

2013-09-13 Thread Andy Whitcroft
BugLink: http://bugs.launchpad.net/bugs/1223499 Signed-off-by: Andy Whitcroft --- drivers/scsi/storvsc_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 14ba8fd..25e7dd5 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scs

[PATCH 2/4] scsi: add scsi device flag to request READ CAPACITY (16) be preferred

2013-09-13 Thread Andy Whitcroft
BugLink: http://bugs.launchpad.net/bugs/1223499 Signed-off-by: Andy Whitcroft --- drivers/scsi/sd.c | 2 ++ include/scsi/scsi_device.h | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 5a8a04d..eba4d6c 100644 --- a/drivers/scsi/sd.c +++ b/d

[PATCH 3/4] scsi: hyper-v storage -- mark as VPD capable at SPC-2

2013-09-13 Thread Andy Whitcroft
BugLink: http://bugs.launchpad.net/bugs/1223499 Signed-off-by: Andy Whitcroft --- drivers/scsi/storvsc_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 1a28f56..14ba8fd 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scs

[PATCH 0/4] Hyper-V TRIM support

2013-09-13 Thread Andy Whitcroft
tl;dr -- enable TRIM support for Hyper-V emulated disks. The Hyper-V hypervisor can support TRIM for its devices, advertising this via the appropriate VPD pages. However the emulated disks only claim to be SPC-2 devices. According to the specs VPD pages (in general) did exist at SPC-2 but the sp

[PATCHv2 05/11] staging: usbip: Add ACL support to usbip bind

2013-09-13 Thread Dominik Paulus
Add the command line argument -a (--allow) to usbip bind to specify networks allowed to attach to the device and code to store the ACLs in sysfs. Signed-off-by: Kurt Kanzenbach Signed-off-by: Dominik Paulus Signed-off-by: Tobias Polzer --- drivers/staging/usbip/userspace/doc/usbip.8 | 8

[PATCHv2 01/11] staging: usbip: Fix IPv6 support in usbipd

2013-09-13 Thread Dominik Paulus
getaddrinfo() leaves the order of the returned addrinfo structs unspecified. On systems with bindv6only disabled (this is the default), PF_INET6 sockets bind to IPv4, too. Thus, IPv6 support in usbipd was broken when getaddrinfo returned first IPv4 and then IPv6 addrinfos, as the IPv6 bind failed w

[PATCHv2 11/11] staging: usbip: Increment version to 1.2.0

2013-09-13 Thread Dominik Paulus
Signed-off-by: Dominik Paulus Signed-off-by: Tobias Polzer --- drivers/staging/usbip/userspace/configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/usbip/userspace/configure.ac b/drivers/staging/usbip/userspace/configure.ac index 099d24b..0b0e035 1006

Re: [PATCH V2 1/1] X86: Hyper-V: Get the local APIC timer frequency from the hypervisor

2013-09-13 Thread Gleb Natapov
On Fri, Sep 13, 2013 at 01:43:09AM +, KY Srinivasan wrote: > > > > -Original Message- > > From: H. Peter Anvin [mailto:h...@zytor.com] > > Sent: Thursday, September 12, 2013 5:28 PM > > To: KY Srinivasan > > Cc: x...@kernel.org; gre...@linuxfoundation.org; > > linux-ker...@vger.kerne

[PATCHv2 09/11] staging: usbip: Improve debug output

2013-09-13 Thread Dominik Paulus
For IPv6, IP:Port is unreadable. Signed-off-by: Dominik Paulus Signed-off-by: Tobias Polzer --- drivers/staging/usbip/userspace/src/usbipd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/usbip/userspace/src/usbipd.c b/drivers/staging/usbip/userspace/src/us

[PATCHv2 07/11] staging: usbip: Add proper error reporting

2013-09-13 Thread Dominik Paulus
This patch adds new error codes and features extended error reporting in op_common packets. Signed-off-by: Dominik Paulus Signed-off-by: Tobias Polzer --- drivers/staging/usbip/userspace/src/usbip_attach.c | 4 +- drivers/staging/usbip/userspace/src/usbip_list.c | 3 +- .../staging/usbip/us

[PATCHv2 0/11] staging: usbip: Userland crypto and ACLs

2013-09-13 Thread Dominik Paulus
Hi, this patch series includes an updated version of the IPv6 support patch (a call to freeaddrinfo() was missing) as well as: - The client/server authentication support using GnuTLS Tobias already announced on the usbip-devel mailing list some time ago[1] - Support for restricting the acce

[PATCHv2 06/11] staging: usbip: Add support for ACLs in usbipd

2013-09-13 Thread Dominik Paulus
Interpret the ACLs stored in sysfs in usbipd and reject clients not matching one of the ACLs. Signed-off-by: Kurt Kanzenbach Signed-off-by: Dominik Paulus Signed-off-by: Tobias Polzer --- drivers/staging/usbip/userspace/src/Makefile.am | 2 +- drivers/staging/usbip/userspace/src/usbipd.c|

[PATCHv2 04/11] staging: usbip: Add CIDR matching helper functions

2013-09-13 Thread Dominik Paulus
This patch adds a few utility functions to match IP addresses against CIDR masks. Signed-off-by: Dominik Paulus Signed-off-by: Tobias Polzer --- drivers/staging/usbip/userspace/src/utils.c | 84 + drivers/staging/usbip/userspace/src/utils.h | 15 ++ 2 files chang

[PATCHv2 03/11] staging: usbip: Add kernel support for client ACLs

2013-09-13 Thread Dominik Paulus
This patch adds the possibility to stored ACLs for allowed clients for each stub device in sysfs. It adds a new sysfs entry called "usbip_acl" for each stub device, containing a list of CIDR masks of allowed clients. This file will be used by usbip and usbipd to store the ACL. Signed-off-by: Kurt

[PATCHv2 10/11] staging: usbip: Separate protocol/program version

2013-09-13 Thread Dominik Paulus
Not all new program versions necessarily introduce non-backwards-compatible protocol changes. We thus move the definition of the protocol version from configure.ac to usbip_network.h, where it logically belongs to. Signed-off-by: Dominik Paulus Signed-off-by: Tobias Polzer --- drivers/staging/u

[PATCHv2 08/11] staging: usbip: Handle usbip being started as user

2013-09-13 Thread Dominik Paulus
usbip now prints an error message when started as user and requiring root access. Also, some debug messages are changed to error messages so the command line utilities now print less confusing (and more verbose) error messages when not used correctly. Signed-off-by: Dominik Paulus Signed-off-by:

[PATCHv2 02/11] staging: usbip: Add support for client authentication

2013-09-13 Thread Dominik Paulus
This patch adds support for authenticating both client and server using a pre-shared passphrase using SRP (Secure Remote Password) over TLS (see RFC 5054) using GnuTLS. Both usbip and usbipd now accept a shared secret as a command line argument. Currently, the established TLS connection is only use

[PATCH v4] mfd: rtsx: Modify rts5249_optimize_phy

2013-09-13 Thread wei_wang
From: Wei WANG In some platforms, specially Thinkpad series, rts5249 won't be initialized properly. So we need adjust some phy parameters to improve the compatibility issue. It is a little different between simulation and real chip. We have no idea about which configuration is better before tape

Re: [PATCH 1/2] staging: zram: fix handle_pending_slot_free() and zram_reset_device() race

2013-09-13 Thread Sergey Senozhatsky
On (09/12/13 15:12), Greg KH wrote: > On Wed, Sep 11, 2013 at 02:12:50AM +0300, Sergey Senozhatsky wrote: > > Dan Carpenter noted that handle_pending_slot_free() is racy with > > zram_reset_device(). Take write init_lock in zram_slot_free(), thus > > preventing any concurrent zram_slot_free(), zram

[patch] staging: line6: add bounds check in snd_toneport_source_put()

2013-09-13 Thread Dan Carpenter
"source" comes from the user in snd_ctl_elem_write() so it needs to be checked. Signed-off-by: Dan Carpenter diff --git a/drivers/staging/line6/toneport.c b/drivers/staging/line6/toneport.c index 2f44d56..776d363 100644 --- a/drivers/staging/line6/toneport.c +++ b/drivers/staging/line6/toneport.

Re: [PATCH v3] mfd: rtsx: Modify rts5249_optimize_phy

2013-09-13 Thread Lee Jones
> >I'm not asking for in-depth analysis, just an overview. > > > >What's wrong with the default config? > >Why is the signal quality bad and what makes it bad? > >What did the old magic numbers do? > >How will the configuration differ if I applied your patch? I'm not sure I'm getting the answers I

[PATCH, resend] staging: silicom: introduce bp_dev_get_idx_bsf() and use it

2013-09-13 Thread Andy Shevchenko
There are two places where duplicate code is located. Moreover, there is a custom implementation of the sscanf() functionality. This patch makes code quite simplier and cleaner. Signed-off-by: Andy Shevchenko --- drivers/staging/silicom/bpctl_mod.c | 188 +--- 1 f