Re: [PATCH] staging: lustre: Replaces 'uint32_t' with '__u32' and 'uint64_t' with '__u64'.

2017-10-31 Thread Dilger, Andreas
On Oct 30, 2017, at 01:58, Roman Storozhenko wrote: > > There are two reasons for that: > 1) As Linus Torvalds said we should use kernel types: > http://lkml.iu.edu/hypermail//linux/kernel/1506.0/00160.html > > 2) There are only few places in the lustre codebase that

[PATCH char-misc 1/1] Drivers: hv: vmbus: Implement Direct Mode for stimer0

2017-10-31 Thread mikelley
From: Michael Kelley The 2016 version of Hyper-V offers the option to operate the guest VM per-vcpu stimer's in Direct Mode, which means the timer interupts on its own vector rather than queueing a VMbus message. Direct Mode reduces timer processing overhead in both the

[PATCH] storvsc: Avoid excessive host scan on controller change

2017-10-31 Thread Long Li
From: Long Li When there are multiple disks attached to the same SCSI controller, the host may send several VSTOR_OPERATION_REMOVE_DEVICE or VSTOR_OPERATION_ENUMERATE_BUS messages in a row, to indicate there is a change on the SCSI controller. In response, storvsc rescans

RE: [PATCH] hv: kvp: Avoid reading past allocated blocks from KVP file

2017-10-31 Thread Long Li
> From: Paul Meyer > > While reading in more than one block (50) of KVP records, the allocation goes > per block, but the reads used the total number of allocated records (without > resetting the pointer/stream). This causes the records buffer to overrun when > the

[PATCH v2] hv: kvp: Avoid reading past allocated blocks from KVP file

2017-10-31 Thread Long Li
From: Paul Meyer While reading in more than one block (50) of KVP records, the allocation goes per block, but the reads used the total number of allocated records (without resetting the pointer/stream). This causes the records buffer to overrun when the refresh reads

RE: [PATCH] hv: kvp: Avoid reading past allocated blocks from KVP file

2017-10-31 Thread Long Li
> On Tue, Oct 31, 2017 at 06:10:00PM +, Long Li wrote: > > > From: Greg KH [mailto:gre...@linuxfoundation.org] > > > Sent: Tuesday, October 31, 2017 1:43 AM > > > To: Long Li > > > Cc: KY Srinivasan ; Haiyang Zhang > > > ;

Re: [PATCH v6 2/2] staging: ion: create one device entry per heap

2017-10-31 Thread Laura Abbott
On 10/31/2017 12:11 PM, Mark Brown wrote: > On Tue, Oct 31, 2017 at 12:03:35PM -0700, Laura Abbott wrote: > >> I'm not a fan of the platform bus but I have mixed feelings about >> creating a dedicated bus type. I guess if we really need a bus >> type we can do it later? > > There was a

Re: [PATCH] hv: kvp: Avoid reading past allocated blocks from KVP file

2017-10-31 Thread Greg KH
On Tue, Oct 31, 2017 at 06:10:00PM +, Long Li wrote: > > From: Greg KH [mailto:gre...@linuxfoundation.org] > > Sent: Tuesday, October 31, 2017 1:43 AM > > To: Long Li > > Cc: KY Srinivasan ; Haiyang Zhang > > ; Stephen

RE: [PATCH v2 1/1] staging: Fix incorrect unisys MAINTAINERS pattern

2017-10-31 Thread Kershner, David A
> -Original Message- > From: Tom Saeger [mailto:tom.sae...@oracle.com] > Sent: Tuesday, October 31, 2017 11:30 AM > To: Kershner, David A ; Greg Kroah-Hartman > ; *S-Par-Maintainer > ;

[PATCH char-misc v2 1/1] Drivers: hv: vmbus: Remove x86-isms from arch independent drivers

2017-10-31 Thread mikelley
From: Michael Kelley hv_is_hypercall_page_setup() is used to check if Hyper-V is initialized, but a 'hypercall page' is an x86 implementation detail that isn't necessarily present on other architectures. Rename to the architecture independent hv_is_hyperv_initialized()

Re: [PATCH v6 2/2] staging: ion: create one device entry per heap

2017-10-31 Thread Mark Brown
On Tue, Oct 31, 2017 at 12:03:35PM -0700, Laura Abbott wrote: > I'm not a fan of the platform bus but I have mixed feelings about > creating a dedicated bus type. I guess if we really need a bus > type we can do it later? There was a discussion a while ago in the context of I2C/SPI MFDs which

Re: [PATCH v6 2/2] staging: ion: create one device entry per heap

2017-10-31 Thread Laura Abbott
On 10/23/2017 08:55 AM, Benjamin Gaignard wrote: > Instead a getting only one common device "/dev/ion" for > all the heaps this patch allow to create one device > entry ("/dev/ionX") per heap. > Getting an entry per heap could allow to set security rules > per heap and global ones for all heaps. >

[PATCH] hv: kvp: Avoid reading past allocated blocks from KVP file

2017-10-31 Thread Long Li
From: Paul Meyer While reading in more than one block (50) of KVP records, the allocation goes per block, but the reads used the total number of allocated records (without resetting the pointer/stream). This causes the records buffer to overrun when the refresh reads

RE: [PATCH] hv: kvp: Avoid reading past allocated blocks from KVP file

2017-10-31 Thread Long Li
> From: Greg KH [mailto:gre...@linuxfoundation.org] > Sent: Tuesday, October 31, 2017 1:43 AM > To: Long Li > Cc: KY Srinivasan ; Haiyang Zhang > ; Stephen Hemminger ; > de...@linuxdriverproject.org;

Re: [PATCH 10/17] hyper-v: trace vmbus_open()

2017-10-31 Thread Stephen Hemminger
On Tue, 31 Oct 2017 13:48:00 +0100 Greg KH wrote: > On Mon, Oct 30, 2017 at 10:31:34AM -0400, Steven Rostedt wrote: > > On Mon, 30 Oct 2017 11:32:20 +0100 > > Greg KH wrote: > > > > > On Mon, Oct 30, 2017 at 11:07:01AM +0100, Vitaly

Re: [PATCH net-next 2/4] hv_netvsc: protect nvdev->extension with RCU

2017-10-31 Thread Vitaly Kuznetsov
Stephen Hemminger writes: > On Tue, 31 Oct 2017 14:42:02 +0100 > Vitaly Kuznetsov wrote: > >> @@ -2002,7 +2002,9 @@ static int netvsc_probe(struct hv_device *dev, >> device_info.recv_sections = NETVSC_DEFAULT_RX; >>

Re: [PATCH net-next 3/4] hv_netvsc: reset net_device_ctx->nvdev with rcu_assign_pointer()

2017-10-31 Thread Stephen Hemminger
On Tue, 31 Oct 2017 07:09:58 -0700 Eric Dumazet wrote: > On Tue, 2017-10-31 at 14:42 +0100, Vitaly Kuznetsov wrote: > > RCU_INIT_POINTER() is not suitable here as it doesn't give us ordering > > guarantees (see the comment in rcupdate.h). This is also not a hotpath. > >

Re: [PATCH net-next 2/4] hv_netvsc: protect nvdev->extension with RCU

2017-10-31 Thread Stephen Hemminger
On Tue, 31 Oct 2017 14:42:02 +0100 Vitaly Kuznetsov wrote: > @@ -2002,7 +2002,9 @@ static int netvsc_probe(struct hv_device *dev, > device_info.recv_sections = NETVSC_DEFAULT_RX; > device_info.recv_section_size = NETVSC_RECV_SECTION_SIZE; > > + rtnl_lock();

Re: [PATCH net-next 1/4] hv_netvsc: netvsc_teardown_gpadl() split

2017-10-31 Thread Stephen Hemminger
On Tue, 31 Oct 2017 14:42:01 +0100 Vitaly Kuznetsov wrote: > It was found that in some cases host refuses to teardown GPADL for send/ > receive buffers (probably when some work with these buffere is scheduled or > ongoing). Change the teardown logic to be: > 1) Send

[PATCH 6/7] media: atomisp: get rid of storage_class.h

2017-10-31 Thread Mauro Carvalho Chehab
Don't hide function declaration on ugly macros. Signed-off-by: Mauro Carvalho Chehab --- .../base/circbuf/interface/ia_css_circbuf.h| 39 +++--- .../base/circbuf/interface/ia_css_circbuf_desc.h | 15 -

[PATCH 5/7] media: atomisp: get rid of wrong stddef.h include

2017-10-31 Thread Mauro Carvalho Chehab
The places at atomisp.h that use stddef.h are wrong: the types it needs are actually defined at linux/types.h. Also, it causes lots of smatch warnings due to the redefinition of ofsetof() macro: /opt/gcc-7.1.0/x86/lib/gcc/x86_64-pc-linux-gnu/7.1.0/include/stddef.h:417:9: warning: preprocessor

[PATCH 1/7] media: atomisp: fix ident for assert/return

2017-10-31 Thread Mauro Carvalho Chehab
On lots of places, assert/return are starting at the first column, causing indentation issues, as complained by spatch: drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/irq_private.h:32 irq_reg_store() warn: inconsistent indenting Used this small script to fix such

[PATCH 0/7] Shut up several smatch warnings with atomisp

2017-10-31 Thread Mauro Carvalho Chehab
The atomisp alone produces a way more warnings with smatch than all other media drivers. That prevents me to identify what's wrong on other drivers. Cleanup the no-brain ones, in order to reduce the list to something that would be easier to handle. Still, after this series, we have several

[PATCH 7/7] media: atomisp: make function calls cleaner

2017-10-31 Thread Mauro Carvalho Chehab
The #ifs inside the code makes confusing for reviewers and also cause problems with smatch: drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c:2937:1: error: directive in argument list drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c:2939:1: error: directive in

[PATCH 2/7] media: atomisp: fix spatch warnings at sh_css.c

2017-10-31 Thread Mauro Carvalho Chehab
drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c:5801:1: error: directive in argument list drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c:5803:1: error: directive in argument list drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c:3795 create_host_acc_pipeline()

[PATCH 4/7] media: atomisp: fix other inconsistent identing

2017-10-31 Thread Mauro Carvalho Chehab
As reported by smatch: drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/src/pipeline.c:607 pipeline_stage_create() warn: inconsistent indenting drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:255 ov2680_write_reg_array() warn: inconsistent indenting

[PATCH 3/7] media: atomisp: fix switch coding style at input_system.c

2017-10-31 Thread Mauro Carvalho Chehab
Fix a switch at input_system.c that were causing smatch warnings: drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c:610 rx_channel_get_state() warn: inconsistent indenting

[PATCH v2 1/1] staging: Fix incorrect unisys MAINTAINERS pattern

2017-10-31 Thread Tom Saeger
Fix stale path to documentation in MAINTAINERS file. Signed-off-by: Tom Saeger Cc: David Kershner Cc: Greg Kroah-Hartman --- drivers/staging/unisys/MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH] staging: Fix incorrect unisys MAINTAINERS pattern

2017-10-31 Thread Tom Saeger
On Tue, Oct 31, 2017 at 04:10:42PM +0100, Greg Kroah-Hartman wrote: > On Tue, Oct 31, 2017 at 09:55:54AM -0500, Tom Saeger wrote: > > Signed-off-by: Tom Saeger > > Cc: David Kershner > > Cc: Greg Kroah-Hartman > > ---

Re: [PATCH] staging: Fix incorrect unisys MAINTAINERS pattern

2017-10-31 Thread Greg Kroah-Hartman
On Tue, Oct 31, 2017 at 09:55:54AM -0500, Tom Saeger wrote: > Signed-off-by: Tom Saeger > Cc: David Kershner > Cc: Greg Kroah-Hartman > --- > drivers/staging/unisys/MAINTAINERS | 2 +- > 1 file changed, 1

[PATCH] staging: Fix incorrect unisys MAINTAINERS pattern

2017-10-31 Thread Tom Saeger
Signed-off-by: Tom Saeger Cc: David Kershner Cc: Greg Kroah-Hartman --- drivers/staging/unisys/MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/unisys/MAINTAINERS

Re: [PATCH net-next 3/4] hv_netvsc: reset net_device_ctx->nvdev with rcu_assign_pointer()

2017-10-31 Thread Vitaly Kuznetsov
David Miller writes: > From: Vitaly Kuznetsov > Date: Tue, 31 Oct 2017 15:40:06 +0100 > >> Eric Dumazet writes: >> >>> On Tue, 2017-10-31 at 14:42 +0100, Vitaly Kuznetsov wrote: RCU_INIT_POINTER() is not suitable here as

Re: [PATCH net-next 3/4] hv_netvsc: reset net_device_ctx->nvdev with rcu_assign_pointer()

2017-10-31 Thread David Miller
From: Vitaly Kuznetsov Date: Tue, 31 Oct 2017 15:40:06 +0100 > Eric Dumazet writes: > >> On Tue, 2017-10-31 at 14:42 +0100, Vitaly Kuznetsov wrote: >>> RCU_INIT_POINTER() is not suitable here as it doesn't give us ordering >>> guarantees (see the

Re: [PATCH net-next 3/4] hv_netvsc: reset net_device_ctx->nvdev with rcu_assign_pointer()

2017-10-31 Thread Vitaly Kuznetsov
Eric Dumazet writes: > On Tue, 2017-10-31 at 14:42 +0100, Vitaly Kuznetsov wrote: >> RCU_INIT_POINTER() is not suitable here as it doesn't give us ordering >> guarantees (see the comment in rcupdate.h). This is also not a hotpath. >> >> Signed-off-by: Vitaly Kuznetsov

Re: [PATCH net-next 3/4] hv_netvsc: reset net_device_ctx->nvdev with rcu_assign_pointer()

2017-10-31 Thread Eric Dumazet
On Tue, 2017-10-31 at 14:42 +0100, Vitaly Kuznetsov wrote: > RCU_INIT_POINTER() is not suitable here as it doesn't give us ordering > guarantees (see the comment in rcupdate.h). This is also not a hotpath. > > Signed-off-by: Vitaly Kuznetsov > --- >

[PATCH] staging: android: ion: remove redundant variable table

2017-10-31 Thread Colin King
From: Colin Ian King Variable table is being set but is never read, it is therefore redundant and can be removed. Cleans up clang warning: drivers/staging/android/ion/ion.c:112:2: warning: Value stored to 'table' is never read Signed-off-by: Colin Ian King

[PATCH net-next 4/4] hv_netvsc: hide warnings about uninitialized/missing rndis device

2017-10-31 Thread Vitaly Kuznetsov
Hyper-V hosts are known to send RNDIS messages even after we halt the device in rndis_filter_halt_device(). Remove user visible messages as they are not really useful. Signed-off-by: Vitaly Kuznetsov --- drivers/net/hyperv/rndis_filter.c | 4 ++-- 1 file changed, 2

[PATCH net-next 3/4] hv_netvsc: reset net_device_ctx->nvdev with rcu_assign_pointer()

2017-10-31 Thread Vitaly Kuznetsov
RCU_INIT_POINTER() is not suitable here as it doesn't give us ordering guarantees (see the comment in rcupdate.h). This is also not a hotpath. Signed-off-by: Vitaly Kuznetsov --- drivers/net/hyperv/netvsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH net-next 2/4] hv_netvsc: protect nvdev->extension with RCU

2017-10-31 Thread Vitaly Kuznetsov
rndis_filter_receive() is called from interrupt context and may race with rndis_filter_device_remove() resetting extension pointer. RNDIS_MSG_HALT does not help, host may still send us messages after it. Protect extension pointer with RCU. Signed-off-by: Vitaly Kuznetsov ---

[PATCH net-next 1/4] hv_netvsc: netvsc_teardown_gpadl() split

2017-10-31 Thread Vitaly Kuznetsov
It was found that in some cases host refuses to teardown GPADL for send/ receive buffers (probably when some work with these buffere is scheduled or ongoing). Change the teardown logic to be: 1) Send NVSP_MSG1_TYPE_REVOKE_* messages 2) Close the channel 3) Teardown GPADLs. This seems to work

[PATCH net-next 0/4] hv_netvsc: fix some crashes and hangs on channel/mtu changes

2017-10-31 Thread Vitaly Kuznetsov
It was found that netvsc driver doesn't survive e.g. # while true; do ethtool -L eth0 combined 4; ethtool -L eth0 combined 8; done" test. I was able to identify several issues: hang in guest/host communication and a couple of crashes. Fix these. While I'm not convinced I'm fixing everything VMs

Re: [PATCH 10/17] hyper-v: trace vmbus_open()

2017-10-31 Thread Steven Rostedt
On Tue, 31 Oct 2017 13:48:00 +0100 Greg KH wrote: > > I don't see how that information can be extracted easily without a > > tracepoint here. Am I missing something? > > Wasn't one of the outcomes of the conference last week the fact that for > ftrace + ebpf we

[PATCH V3] scsi: storvsc: Allow only one remove lun work item to be issued per lun

2017-10-31 Thread Cathy Avery
When running multipath on a VM if all available paths go down the driver can schedule large amounts of storvsc_remove_lun work items to the same lun. In response to the failing paths typically storvsc responds by taking host->scan_mutex and issuing a TUR per lun. If there has been heavy IO to the

Re: [PATCH 10/17] hyper-v: trace vmbus_open()

2017-10-31 Thread Greg KH
On Mon, Oct 30, 2017 at 10:31:34AM -0400, Steven Rostedt wrote: > On Mon, 30 Oct 2017 11:32:20 +0100 > Greg KH wrote: > > > On Mon, Oct 30, 2017 at 11:07:01AM +0100, Vitaly Kuznetsov wrote: > > > Greg KH writes: > > > > > > > On Mon,

Re: [PATCH 2/2] Drivers: hv: vmbus: Make pannic reporting to be more useful

2017-10-31 Thread Greg KH
On Sun, Oct 29, 2017 at 11:33:41AM -0700, k...@exchange.microsoft.com wrote: > From: "K. Y. Srinivasan" > > Hyper-V allows the guest to report panic and the guest can pass additional "pannic" or "panic"? :) I'll go fix it up by hand... {sigh} greg k-h

Re: [PATCH V2] scsi: storvsc: Allow only one remove lun work item to be issued per lun

2017-10-31 Thread Cathy Avery
On 10/31/2017 08:24 AM, Martin K. Petersen wrote: If you use alloc_ordered_workqueue directly instead of create_singlethread_workqueue you can pass a format string and don't need the separate allocation. But I'm not sure if Tejun is fine with using __WQ_LEGACY directly.. The only thing that

Re: [PATCH V2] scsi: storvsc: Allow only one remove lun work item to be issued per lun

2017-10-31 Thread Martin K. Petersen
>> If you use alloc_ordered_workqueue directly instead of >> create_singlethread_workqueue you can pass a format string and don't >> need the separate allocation. >> >> But I'm not sure if Tejun is fine with using __WQ_LEGACY directly.. > > The only thing that flag does is exempting the

[PATCH 3/3] staging: ccree: remove dead code

2017-10-31 Thread Gilad Ben-Yossef
The inflight_counter field is updated in a single location and never used. Remove it. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_cipher.c | 4 drivers/staging/ccree/ssi_driver.h | 1 - 2 files changed, 5 deletions(-) diff --git

[PATCH 2/3] staging: ccree: handle limiting of DMA masks

2017-10-31 Thread Gilad Ben-Yossef
Properly handle limiting of DMA masks based on device and bus capabilities. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_driver.c | 22 ++ 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/drivers/staging/ccree/ssi_driver.c

[PATCH 1/3] staging: ccree: copy IV to DMAable memory

2017-10-31 Thread Gilad Ben-Yossef
We are being passed an IV buffer from unknown origin, which may be stack allocated and thus not safe for DMA. Allocate a DMA safe buffer for the IV and use that instead. Signed-off-by: Gilad Ben-Yossef --- drivers/staging/ccree/ssi_cipher.c | 16 ++--

[PATCH 0/3] staging: ccree: Fixes and cleanups

2017-10-31 Thread Gilad Ben-Yossef
Fixes and cleanups for 4.15 Gilad Ben-Yossef (3): staging: ccree: copy IV to DMAable memory staging: ccree: handle limiting of DMA masks staging: ccree: remove dead code drivers/staging/ccree/ssi_cipher.c | 20 ++-- drivers/staging/ccree/ssi_cipher.h | 1 +

Re: [PATCH] staging: rtl8192e: set priv->irq as 0 after the irq is freed

2017-10-31 Thread Dan Carpenter
On Sat, Oct 28, 2017 at 12:03:46PM +0530, Arvind Yadav wrote: > _rtl92e_init can fail here, we must set priv->irq as 0 after free_irq. > The changelog isn't useful. It should say that we are doing this because we call free_irq() again in _rtl92e_pci_probe() so it's a double free. This fix

[git:media_tree/master] media: staging: atomisp: Convert timers to use timer_setup()

2017-10-31 Thread Mauro Carvalho Chehab
This is an automatic generated email to let you know that the following patch were queued: Subject: media: staging: atomisp: Convert timers to use timer_setup() Author: Kees Cook Date:Wed Oct 4 20:47:38 2017 -0400 In preparation for unconditionally passing the

Re: [PATCH] hv: kvp: Avoid reading past allocated blocks from KVP file

2017-10-31 Thread Greg KH
On Mon, Oct 30, 2017 at 05:08:03PM -0700, Long Li wrote: > From: Paul Meyer > > While reading in more than one block (50) of KVP records, the allocation goes > per block, but the reads used the total number of allocated records (without > resetting the pointer/stream).

Re: [PATCH] staging: lustre: Replaces 'uint32_t' with '__u32' and 'uint64_t' with '__u64'.

2017-10-31 Thread Dilger, Andreas
On Oct 30, 2017, at 01:58, Roman Storozhenko wrote: > > There are two reasons for that: > 1) As Linus Torvalds said we should use kernel types: > http://lkml.iu.edu/hypermail//linux/kernel/1506.0/00160.html > > 2) There are only few places in the lustre codebase that