[PATCH v2] staging: mt7621-dma: Add braces around else branches

2018-10-23 Thread Kimberly Brown
Add braces around else branches in conditional statements that include branches with multiple statements. This style complies with the Linux kernel coding style and improves consistency and readability. Issues found by checkpatch. Signed-off-by: Kimberly Brown Reviewed-by: Matthias Brugger

[PATCH v2] Drivers: hv: vmbus: Expose counters for interrupts and full conditions

2019-01-04 Thread Kimberly Brown
drivers were in use. Signed-off-by: Kimberly Brown --- Changes in v2: - Added mailing lists to the cc list - Removed the host to guest interrupt counters proposed in v1 because they were not accurate - Added full condition counters for the channel's outbound ring buffer Documentation

[PATCH v3] Drivers: hv: vmbus: Expose counters for interrupts and full conditions

2019-01-16 Thread Kimberly Brown
drivers were in use. Signed-off-by: Kimberly Brown --- Changes in v3: - Used the outbound ring buffer spinlock to protect the the full condition counters in set_channel_pending_send_size() - Corrected the KernelVersion values for the new entries in Documentation/ABI/stable/sysfs-bus-vmbus

Re: [PATCH v3] Drivers: hv: vmbus: Expose counters for interrupts and full conditions

2019-01-21 Thread Kimberly Brown
On Thu, Jan 17, 2019 at 09:11:03AM -0800, Stephen Hemminger wrote: > > > > +static ssize_t channel_intr_in_full_show(const struct vmbus_channel > > *channel, > > +char *buf) > > +{ > > + return sprintf(buf, "%llu\n", channel->intr_in_full); > > +} > > >

[PATCH] Drivers: hv: vmbus: Add mutex lock to channel show functions

2019-01-21 Thread Kimberly Brown
The channel level "_show" functions are vulnerable to race conditions. Add a mutex lock and unlock around the call to the channel level "_show" functions in vmbus_chan_attr_show(). This problem was discussed here: https://lkml.org/lkml/2018/10/18/830 Signed-off-by: Kimberly

Re: [PATCH] Drivers: hv: vmbus: Add mutex lock to channel show functions

2019-01-21 Thread Kimberly Brown
On Tue, Jan 22, 2019 at 03:46:48AM +, Dexuan Cui wrote: > > From: Kimberly Brown > > Sent: Monday, January 21, 2019 6:08 PM > > Subject: [PATCH] Drivers: hv: vmbus: Add mutex lock to channel show > > functions > > > > The channel level "_show&quo

[PATCH v2 2/2] Drivers: hv: vmbus: Return -EINVAL if monitor_allocated not set

2019-02-18 Thread Kimberly Brown
onitor_allocated" is set before accessing the monitor id or the monitor page data. If "channel->offermsg.monitor_allocated" is not set, return -EINVAL. Signed-off-by: Kimberly Brown --- Documentation/ABI/stable/sysfs-bus-vmbus | 15 -- drivers/hv/vmbus_drv.c

[PATCH v2 0/2] Drivers: hv: vmbus: Fix sysfs functions that display monitor id and page data

2019-02-18 Thread Kimberly Brown
nger. - Updated the sysfs documentation to describe the new return value. Kimberly Brown (2): Drivers: hv: vmbus: Change server monitor_pages index to 0 Drivers: hv: vmbus: Return -EINVAL if monitor_allocated not set Documentation/ABI/stable/sysfs-bus-vmbus | 15 +++-- drive

[PATCH v2 1/2] Drivers: hv: vmbus: Change server monitor_pages index to 0

2019-02-18 Thread Kimberly Brown
ion, the server_monitor_latency_show() and server_monitor_conn_id_show() functions use monitor_pages index '0'. Signed-off-by: Kimberly Brown Acked-by: Stephen Hemminger --- drivers/hv/vmbus_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_dr

[PATCH 0/2] Drivers: hv: vmbus: Fix sysfs functions that display monitor id and page data

2019-02-08 Thread Kimberly Brown
, display nothing in the channel's monitor id and monitor page data sysfs files. The data that is currently shown in sysfs is incorrect. Kimberly Brown (2): Drivers: hv: vmbus: Change server monitor_pages index to 0 Drivers: hv: vmbus: Display nothing in sysfs if monitor_allocated not set

[PATCH 2/2] Drivers: hv: vmbus: Display nothing in sysfs if monitor_allocated not set

2019-02-08 Thread Kimberly Brown
ocated to a channel. In the affected "_show" functions, verify that "channel->offermsg.monitor_allocated" is set before accessing the monitor id or the monitor_page data. If "channel->offermsg.monitor_allocated" is not set, display nothing. Signed-off-by: Kimber

[PATCH 1/2] Drivers: hv: vmbus: Change server monitor_pages index to 0

2019-02-08 Thread Kimberly Brown
ion, the server_monitor_latency_show() and server_monitor_conn_id_show() functions use monitor_pages index '0'. Signed-off-by: Kimberly Brown --- drivers/hv/vmbus_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c index 403fee015

Re: [PATCH 2/2] Drivers: hv: vmbus: Display nothing in sysfs if monitor_allocated not set

2019-02-13 Thread Kimberly Brown
On Mon, Feb 11, 2019 at 10:02:47AM -0800, Stephen Hemminger wrote: > On Mon, 11 Feb 2019 02:01:18 -0500 > Kimberly Brown wrote: > > > On Fri, Feb 08, 2019 at 02:32:09PM -0800, Stephen Hemminger wrote: > > > On Fri, 8 Feb 2019 05:01:12 -0500 > > > Kimberly Brown

Re: [PATCH] Drivers: hv: vmbus: Add mutex lock to channel show functions

2019-02-14 Thread Kimberly Brown
On Thu, Feb 14, 2019 at 08:54:31PM -0500, Sasha Levin wrote: > On Sat, Feb 02, 2019 at 03:07:35PM -0500, Kimberly Brown wrote: > > On Fri, Feb 01, 2019 at 06:24:24PM +, Dexuan Cui wrote: > > > > From: Kimberly Brown > > > > Sent: Thursday, January 31, 2

Re: [PATCH 2/2] Drivers: hv: vmbus: Display nothing in sysfs if monitor_allocated not set

2019-02-11 Thread Kimberly Brown
On Fri, Feb 08, 2019 at 02:32:09PM -0800, Stephen Hemminger wrote: > On Fri, 8 Feb 2019 05:01:12 -0500 > Kimberly Brown wrote: > > You are right, the current behavior is broken. > It would be good to add a description of under what conditions > monitor is not used. Is this some

Re: [PATCH] Drivers: hv: vmbus: Add mutex lock to channel show functions

2019-01-28 Thread Kimberly Brown
On Tue, Jan 22, 2019 at 06:40:30PM +, Dexuan Cui wrote: > > From: Kimberly Brown > > Sent: Monday, January 21, 2019 10:43 PM > > > > @@ -1421,7 +1422,10 @@ static ssize_t vmbus_chan_attr_show(struct > > > > kobject *kobj, > > > >

Re: [PATCH] Drivers: hv: vmbus: Add mutex lock to channel show functions

2019-02-02 Thread Kimberly Brown
On Fri, Feb 01, 2019 at 06:24:24PM +, Dexuan Cui wrote: > > From: Kimberly Brown > > Sent: Thursday, January 31, 2019 9:47 AM > > ... > > 2) Prevent a deadlock that can occur between the proposed mutex_lock() > > call in the vmbus_chan_attr_show() function and th

Re: [PATCH] Drivers: hv: vmbus: Add mutex lock to channel show functions

2019-01-31 Thread Kimberly Brown
On Thu, Jan 31, 2019 at 04:45:35PM +, Michael Kelley wrote: > From: Sasha Levin Sent: Thursday, January 31, 2019 7:20 AM > > > > I've queued this one for hyper-fixes, thanks all! > > > > Actually, please hold off on queuing this one. In a conversation I had > yesterday with Kim, they had

[PATCH v4] Drivers: hv: vmbus: Expose counters for interrupts and full conditions

2019-02-03 Thread Kimberly Brown
created and observing the counter values. The values seemed to increase by a reasonable amount when the Hyper-v related drivers were in use. Signed-off-by: Kimberly Brown --- Changes in v4: - In the commit message, added a paragraph describing why the full condition counters are incremented