The kobj_type default_attrs field is being replaced by the
default_groups field. Replace the default_attrs field in ext4_sb_ktype
and ext4_feat_ktype with default_groups. Use the ATTRIBUTE_GROUPS macro
to create ext4_groups and ext4_feat_groups.
Signed-off-by: Kimberly Brown
---
This patch
On Thu, Apr 25, 2019 at 10:12:53PM +0200, Greg Kroah-Hartman wrote:
> On Mon, Apr 01, 2019 at 10:51:10PM -0400, Kimberly Brown wrote:
> > This patchset adds support for default attribute groups to kobj_type.
> > Also, the uses of kobj_type's default_attrs field are replaced with
>
that the sysfs files for the attributes in the default groups
were created.
Signed-off-by: Kimberly Brown
---
kernel/livepatch/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c
index eb0ee10a1981..34a8338657d2 100644
--- a/kernel
groups were created.
Signed-off-by: Kimberly Brown
---
kernel/irq/irqdesc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index 13539e12cd80..bbec57bda666 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -275,11 +275,12
as tested by setting the scaling governor to schedutil and
verifying that the sysfs files for the attributes in the default groups
were created.
Signed-off-by: Kimberly Brown
---
kernel/sched/cpufreq_schedutil.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/kernel/sched/cpufreq_
for the attributes in the default group were
created.
Signed-off-by: Kimberly Brown
---
samples/kobject/kset-example.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/samples/kobject/kset-example.c b/samples/kobject/kset-example.c
index 401328fd687d..c8010f126808 100644
uses of kobj_type’s attribute list will
be converted to attribute groups. When that is complete, kobj_type’s
attribute list, “default_attrs”, will be removed.
Signed-off-by: Kimberly Brown
---
include/linux/kobject.h | 3 ++-
lib/kobject.c | 14 ++
2 files changed, 16
On Thu, Mar 21, 2019 at 04:04:20PM +, Michael Kelley wrote:
> From: Kimberly Brown Sent: Wednesday, March 20, 2019
> 8:48 PM
> > > > > Adding more locks will solve the problem but it seems like overkill.
> > > > > Why not either use a re
On Sat, Mar 23, 2019 at 07:07:37AM +0100, Greg Kroah-Hartman wrote:
> On Fri, Mar 22, 2019 at 04:14:40PM -0400, Kimberly Brown wrote:
> > kobj_type currently uses a list of individual attributes to store
> > default attributes. Attribute groups are more flexible than a list of
uses of kobj_type’s attribute list will
be converted to attribute groups. When that is complete, kobj_type’s
attribute list, “default_attrs”, will be removed.
Signed-off-by: Kimberly Brown
---
include/linux/kobject.h | 3 ++-
lib/kobject.c | 14 ++
2 files changed, 16
On Wed, Mar 20, 2019 at 01:06:19PM -0700, Stephen Hemminger wrote:
> On Sat, 16 Mar 2019 21:49:28 -0400
> Kimberly Brown wrote:
>
> > On Thu, Mar 14, 2019 at 03:45:33PM -0700, Stephen Hemminger wrote:
> > > On Thu, 14 Mar 2019 13:05:15 -0700
> > > "Kimber
k function to be applied to the channel-level
attributes.
Call "sysfs_create_group()" in "vmbus_add_channel_kobj()" to create the
channel's sysfs files. Add a new function,
“vmbus_remove_channel_attr_group()”, and call it in "free_channel()" to
remove the channel's sysfs fil
On Thu, Mar 14, 2019 at 03:45:33PM -0700, Stephen Hemminger wrote:
> On Thu, 14 Mar 2019 13:05:15 -0700
> "Kimberly Brown" wrote:
>
> > Fix a race condition that can result in a ring buffer pointer being set
> > to null while a "_show" function is reading
Set "ring_info->priv_read_index" to 0. Now, all of ring_info's fields
are explicitly set in this function. The memset() call is no longer
necessary, so remove it.
Signed-off-by: Kimberly Brown
---
drivers/hv/ring_buffer.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-
tion. However, using this
mutex could result in a deadlock, so a new approach is proposed in
this patchset.
- Patch 1 is new and consists of refactoring an if statement.
- Patch 2 introduces a new mutex lock in the “vmbus_channel” struct,
which is used to eliminate the race condition.
Kimb
so that the locks can be acquired/released in these
functions.
Acquire/release the locks in hv_ringbuffer_get_debuginfo(). Remove the
"const" qualifier from the "hv_ring_buffer_info" parameter so that the
locks can be acquired/released in this function.
Signed-off-by: Kimberly Brown
---
drivers/hv
g buffer. The ring buffer pointer does not need to be
checked before calling the other "_show" functions, and moving the
ring buffer pointer "if statement" to the "_show" functions that
access a ring buffer makes the purpose of the "if statement" clear.
Signe
On Sat, Mar 09, 2019 at 08:21:35AM +0100, Greg KH wrote:
> On Fri, Mar 08, 2019 at 05:46:11PM -0500, Kimberly Brown wrote:
> > static struct kobj_type vmbus_chan_ktype = {
> > .sysfs_ops = _chan_sysfs_ops,
> > .release = vmbus_chan_release,
> > - .defau
roup have been created. Add the
“vmbus_remove_channel_attr_group()” function, which calls
"sysfs_remove_group()" on “vmbus_chan_group” if the attributes were
created.
Signed-off-by: Kimberly Brown
---
Changes in v5:
- Added the “bool sysfs_group_ready” field to vmbus_channel.
On Sat, Mar 02, 2019 at 06:39:30PM +, Michael Kelley wrote:
> From: Kimberly Brown Sent: Friday, March 1, 2019
> 11:18 AM
> >
> > +/*
> > + * Channel-level attribute_group callback function. Returns the permission
> > for
> > + * each attr
On Sun, Mar 03, 2019 at 09:05:43AM +0100, Greg KH wrote:
> On Fri, Mar 01, 2019 at 02:18:24PM -0500, Kimberly Brown wrote:
> > +/*
> > + * Channel-level attribute_group callback function. Returns the permission
> > for
> > + * each attribute, and returns 0 if
e()" callback function to be applied to the
channel-level attributes. Call "sysfs_create_group()" to create the
channel sysyfs files.
Signed-off-by: Kimberly Brown
---
Changes in v4:
- Added “is_visible()” callback functions for the device-level and
channel-level attribute groups.
-
On Sun, Feb 24, 2019 at 04:53:03PM +, Michael Kelley wrote:
> From: Kimberly Brown Sent: Thursday, February 21, 2019
> 7:47 PM
> >
> > The "_show" functions that access channel ring buffer data are
> > vulnerable to a race condition that can result
vmbus_add_channel_kobj().
Signed-off-by: Kimberly Brown
---
Changes in v3:
The monitor "_show" functions no longer return an error when a channel
does not use the monitor page mechanism. Instead, the monitor page sysfs
files are created only when a channel uses the monitor page mechanism.
This
you to fetch changes up to b2946cd86f3c1b5b1262c0ec06068110c2328fe6:
> > > >
> > > > MAINTAINERS: Change mailing list for Hyper-V CORE AND DRIVERS
> > > > (2019-02-22 21:46:37 -0500)
> > > >
> > > > -
> > &
> (2019-02-22 21:46:37 -0500)
> > >
> > > - --------
> > > Two fixes:
> > >
> > > 1. A fix for a race condition reading sysfs entries while a device is
> > > being added, by Kimberly Brown.
quot; in hv_ringbuffer_get_debuginfo().
Pass the channel pointer to hv_ringbuffer_get_debuginfo() so that
"ring_buffer_mutex" can be accessed in this function.
Signed-off-by: Kimberly Brown
---
drivers/hv/channel.c | 5 ++
drivers/hv/channel_mgmt.c | 1 +
drivers/hv/ring_buffer.c | 11
g buffer. The ring buffer pointer does not need to be
checked before calling the other "_show" functions, and moving the
ring buffer pointer "if statement" to the "_show" functions that
access a ring buffer makes the purpose of the "if statement" clear
uld result in a deadlock, so a new approach is needed.
- Patch 1 is new and consists of a code refactor.
- Patch 2 introduces a new mutex lock in the “vmbus_channel” struct,
and the new mutex is used to eliminate the race condition.
Kimberly Brown (2):
Drivers: hv: vmbus: Refactor chan->state
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
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
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
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
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
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
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
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
, 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
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
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
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
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,
> > > >
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
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
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);
> > +}
>
>
>
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
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
47 matches
Mail list logo