2019-02-23 03:13:03

by Sasha Levin

[permalink] [raw]
Subject: [GIT PULL v3] Hyper-V commits for 5.0-rc

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

The following changes since commit 8834f5600cf3c8db365e18a3d5cac2c2780c81e5:

Linux 5.0-rc5 (2019-02-03 13:48:04 -0800)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git tags/hyperv-fixes-signed

for you to fetch changes up to b2946cd86f3c1b5b1262c0ec06068110c2328fe6:

MAINTAINERS: Change mailing list for Hyper-V CORE AND DRIVERS (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.

2. Update the Hyper-V mailing list to a new one created on
vger.kernel.org, by Haiyang Zhang.

- ----------------------------------------------------------------
Haiyang Zhang (1):
MAINTAINERS: Change mailing list for Hyper-V CORE AND DRIVERS

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 +++++++++---
MAINTAINERS | 2 +-
drivers/hv/vmbus_drv.c | 39 +++++++++++++++++++++++++++++++-
3 files changed, 51 insertions(+), 5 deletions(-)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE4n5dijQDou9mhzu83qZv95d3LNwFAlxwucgACgkQ3qZv95d3
LNxkUg/9GmnREx3P9dvQECTeT/ynuL1kbA6lhbwolimrEjdBcEiPRRhD1UKOW5lb
lwBvp7Qj3+rnVBzI1+950VZoDCsmhCHS2DJ+Iy6OKPASYxCHXfSKfG0BWoid56ar
VTjG93gY9MmfUv/SkiAE/lYRdhGEM5GwojzPwKZ88+bV7gsgSHnFLeUgf/C5FXfG
PhvviKyV9S4MW5OwTcboNaHNSaS1Wf0EeOE3iHoXiE8Ylj3aJswrCgJWbIc9koQF
+KcugIIMnzTIhrKsxe9wmisAVAdaJo33suVOSgS50xnsVmIiJYtSgZ93/jH1GCXO
0rGuu1Qs/1dzzbZN5heQNm1KIlvpEaudG8pTQFssb3nmzyTPVFMqIb5pPungWpus
h4n/4DHg3pDgZXeTfygqogSkysWwfCoaiBymWfUYEbYJjg0zxgdrGbQvzowu5nOZ
mCBGxhrjJLDCMovkZKZggxutzIL+YTpJjPYmxZgNqnNdGHt9HR3syg142ZC3yXNT
ALZzQVXNk6cmCoTr9q/G3qbaS9Sv7BwMqC8YwGsqC5QbEP3WuKPBC7ifdXtA9nuo
fgAk2g3+vYlRK4kDUhl8EsTWMkH6HDNMe6Hzn4nyl01Qg36lyEwCoY1C32HFg8RR
Roi7nWz6IyQfJixYbkgVznhjHAuFZgIRS307a/n5vmwyYny1VZI=
=h1IS
-----END PGP SIGNATURE-----


2019-02-23 08:57:55

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [GIT PULL v3] Hyper-V commits for 5.0-rc

On Fri, Feb 22, 2019 at 10:12:25PM -0500, Sasha Levin wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA512
>
> The following changes since commit 8834f5600cf3c8db365e18a3d5cac2c2780c81e5:
>
> Linux 5.0-rc5 (2019-02-03 13:48:04 -0800)
>
> are available in the Git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git tags/hyperv-fixes-signed
>
> for you to fetch changes up to b2946cd86f3c1b5b1262c0ec06068110c2328fe6:
>
> MAINTAINERS: Change mailing list for Hyper-V CORE AND DRIVERS (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.
>
> 2. Update the Hyper-V mailing list to a new one created on
> vger.kernel.org, by Haiyang Zhang.
>
> - ----------------------------------------------------------------
> Haiyang Zhang (1):
> MAINTAINERS: Change mailing list for Hyper-V CORE AND DRIVERS
>
> Kimberly Brown (2):
> Drivers: hv: vmbus: Change server monitor_pages index to 0
> Drivers: hv: vmbus: Return -EINVAL if monitor_allocated not set

I objected to this last patch when it was posted on the list. The sysfs
file should just not be present if the functionality is not there, no
need to add the "-EINVAL" logic to it instead.

Having a sysfs file that says it can be read, and then rejecting that
read with an error is NOT ok.

I'll cherry-pick the other two patches, but this one needs to be
reworked.

thanks,

greg k-h

2019-02-23 15:57:39

by Sasha Levin

[permalink] [raw]
Subject: Re: [GIT PULL v3] Hyper-V commits for 5.0-rc

On Sat, Feb 23, 2019 at 09:57:15AM +0100, Greg KH wrote:
>On Fri, Feb 22, 2019 at 10:12:25PM -0500, Sasha Levin wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA512
>>
>> The following changes since commit 8834f5600cf3c8db365e18a3d5cac2c2780c81e5:
>>
>> Linux 5.0-rc5 (2019-02-03 13:48:04 -0800)
>>
>> are available in the Git repository at:
>>
>> git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git tags/hyperv-fixes-signed
>>
>> for you to fetch changes up to b2946cd86f3c1b5b1262c0ec06068110c2328fe6:
>>
>> MAINTAINERS: Change mailing list for Hyper-V CORE AND DRIVERS (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.
>>
>> 2. Update the Hyper-V mailing list to a new one created on
>> vger.kernel.org, by Haiyang Zhang.
>>
>> - ----------------------------------------------------------------
>> Haiyang Zhang (1):
>> MAINTAINERS: Change mailing list for Hyper-V CORE AND DRIVERS
>>
>> Kimberly Brown (2):
>> Drivers: hv: vmbus: Change server monitor_pages index to 0
>> Drivers: hv: vmbus: Return -EINVAL if monitor_allocated not set
>
>I objected to this last patch when it was posted on the list. The sysfs
>file should just not be present if the functionality is not there, no
>need to add the "-EINVAL" logic to it instead.
>
>Having a sysfs file that says it can be read, and then rejecting that
>read with an error is NOT ok.

Hm, I'm sorry but I didn't see an objection on the thread
(https://lore.kernel.org/lkml/20190122020759.GA4054@ubu-Virtual-Machine/)
which is why it was sent in like this.

Could you please point me to it so we can get the patch fixed up?

--
Thanks,
Sasha

2019-02-23 16:49:38

by Kimberly Brown

[permalink] [raw]
Subject: Re: [GIT PULL v3] Hyper-V commits for 5.0-rc

On Sat, Feb 23, 2019 at 10:55:33AM -0500, Sasha Levin wrote:
> On Sat, Feb 23, 2019 at 09:57:15AM +0100, Greg KH wrote:
> > On Fri, Feb 22, 2019 at 10:12:25PM -0500, Sasha Levin wrote:
> > > -----BEGIN PGP SIGNED MESSAGE-----
> > > Hash: SHA512
> > >
> > > The following changes since commit 8834f5600cf3c8db365e18a3d5cac2c2780c81e5:
> > >
> > > Linux 5.0-rc5 (2019-02-03 13:48:04 -0800)
> > >
> > > are available in the Git repository at:
> > >
> > > git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git tags/hyperv-fixes-signed
> > >
> > > for you to fetch changes up to b2946cd86f3c1b5b1262c0ec06068110c2328fe6:
> > >
> > > MAINTAINERS: Change mailing list for Hyper-V CORE AND DRIVERS (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.
> > >
> > > 2. Update the Hyper-V mailing list to a new one created on
> > > vger.kernel.org, by Haiyang Zhang.
> > >
> > > - ----------------------------------------------------------------
> > > Haiyang Zhang (1):
> > > MAINTAINERS: Change mailing list for Hyper-V CORE AND DRIVERS
> > >
> > > Kimberly Brown (2):
> > > Drivers: hv: vmbus: Change server monitor_pages index to 0
> > > Drivers: hv: vmbus: Return -EINVAL if monitor_allocated not set
> >
> > I objected to this last patch when it was posted on the list. The sysfs
> > file should just not be present if the functionality is not there, no
> > need to add the "-EINVAL" logic to it instead.
> >
> > Having a sysfs file that says it can be read, and then rejecting that
> > read with an error is NOT ok.
>
> Hm, I'm sorry but I didn't see an objection on the thread
> (https://lore.kernel.org/lkml/20190122020759.GA4054@ubu-Virtual-Machine/)
> which is why it was sent in like this.
>
> Could you please point me to it so we can get the patch fixed up?
>

The correct link to the "Drivers: hv: vmbus: Return -EINVAL if
monitor_allocated not set" patch thread is:

https://lore.kernel.org/lkml/[email protected]/


Also, this patch doesn't fix a race condition; it fixes a problem with
sysfs returning invalid data.



> --
> Thanks,
> Sasha

2019-02-23 17:15:18

by Sasha Levin

[permalink] [raw]
Subject: Re: [GIT PULL v3] Hyper-V commits for 5.0-rc

On Sat, Feb 23, 2019 at 11:47:49AM -0500, Kimberly Brown wrote:
>On Sat, Feb 23, 2019 at 10:55:33AM -0500, Sasha Levin wrote:
>> On Sat, Feb 23, 2019 at 09:57:15AM +0100, Greg KH wrote:
>> > On Fri, Feb 22, 2019 at 10:12:25PM -0500, Sasha Levin wrote:
>> > > -----BEGIN PGP SIGNED MESSAGE-----
>> > > Hash: SHA512
>> > >
>> > > The following changes since commit 8834f5600cf3c8db365e18a3d5cac2c2780c81e5:
>> > >
>> > > Linux 5.0-rc5 (2019-02-03 13:48:04 -0800)
>> > >
>> > > are available in the Git repository at:
>> > >
>> > > git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git tags/hyperv-fixes-signed
>> > >
>> > > for you to fetch changes up to b2946cd86f3c1b5b1262c0ec06068110c2328fe6:
>> > >
>> > > MAINTAINERS: Change mailing list for Hyper-V CORE AND DRIVERS (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.
>> > >
>> > > 2. Update the Hyper-V mailing list to a new one created on
>> > > vger.kernel.org, by Haiyang Zhang.
>> > >
>> > > - ----------------------------------------------------------------
>> > > Haiyang Zhang (1):
>> > > MAINTAINERS: Change mailing list for Hyper-V CORE AND DRIVERS
>> > >
>> > > Kimberly Brown (2):
>> > > Drivers: hv: vmbus: Change server monitor_pages index to 0
>> > > Drivers: hv: vmbus: Return -EINVAL if monitor_allocated not set
>> >
>> > I objected to this last patch when it was posted on the list. The sysfs
>> > file should just not be present if the functionality is not there, no
>> > need to add the "-EINVAL" logic to it instead.
>> >
>> > Having a sysfs file that says it can be read, and then rejecting that
>> > read with an error is NOT ok.
>>
>> Hm, I'm sorry but I didn't see an objection on the thread
>> (https://lore.kernel.org/lkml/20190122020759.GA4054@ubu-Virtual-Machine/)
>> which is why it was sent in like this.
>>
>> Could you please point me to it so we can get the patch fixed up?
>>
>
>The correct link to the "Drivers: hv: vmbus: Return -EINVAL if
>monitor_allocated not set" patch thread is:
>
>https://lore.kernel.org/lkml/[email protected]/
>
>
>Also, this patch doesn't fix a race condition; it fixes a problem with
>sysfs returning invalid data.

You're right, I had your other patch in mind when I wrote that log
message.

Are you familiar with Greg's objection to the patch? It's not in the
thread you linked to either.

--
Thanks,
Sasha

2019-02-24 08:17:48

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [GIT PULL v3] Hyper-V commits for 5.0-rc

On Sat, Feb 23, 2019 at 10:55:33AM -0500, Sasha Levin wrote:
> On Sat, Feb 23, 2019 at 09:57:15AM +0100, Greg KH wrote:
> > On Fri, Feb 22, 2019 at 10:12:25PM -0500, Sasha Levin wrote:
> > > -----BEGIN PGP SIGNED MESSAGE-----
> > > Hash: SHA512
> > >
> > > The following changes since commit 8834f5600cf3c8db365e18a3d5cac2c2780c81e5:
> > >
> > > Linux 5.0-rc5 (2019-02-03 13:48:04 -0800)
> > >
> > > are available in the Git repository at:
> > >
> > > git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git tags/hyperv-fixes-signed
> > >
> > > for you to fetch changes up to b2946cd86f3c1b5b1262c0ec06068110c2328fe6:
> > >
> > > MAINTAINERS: Change mailing list for Hyper-V CORE AND DRIVERS (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.
> > >
> > > 2. Update the Hyper-V mailing list to a new one created on
> > > vger.kernel.org, by Haiyang Zhang.
> > >
> > > - ----------------------------------------------------------------
> > > Haiyang Zhang (1):
> > > MAINTAINERS: Change mailing list for Hyper-V CORE AND DRIVERS
> > >
> > > Kimberly Brown (2):
> > > Drivers: hv: vmbus: Change server monitor_pages index to 0
> > > Drivers: hv: vmbus: Return -EINVAL if monitor_allocated not set
> >
> > I objected to this last patch when it was posted on the list. The sysfs
> > file should just not be present if the functionality is not there, no
> > need to add the "-EINVAL" logic to it instead.
> >
> > Having a sysfs file that says it can be read, and then rejecting that
> > read with an error is NOT ok.
>
> Hm, I'm sorry but I didn't see an objection on the thread
> (https://lore.kernel.org/lkml/20190122020759.GA4054@ubu-Virtual-Machine/)
> which is why it was sent in like this.
>
> Could you please point me to it so we can get the patch fixed up?

My response was Message-ID: <[email protected]> sent:
Date: Tue, 19 Feb 2019 07:17:48 +0100
but for some reason I do not see it on lore.kernel.org at all :(

I don't know what happened to it, sorry, it was also cc: to you.

Anyway, it just said what I said here, don't do this type of thing, if
the sysfs file is not valid for a specific device, just do not create
it, do not mess around with returning error values when trying to read
from it.

thanks,

greg k-h

2019-02-24 17:37:54

by Kimberly Brown

[permalink] [raw]
Subject: Re: [GIT PULL v3] Hyper-V commits for 5.0-rc

On Sun, Feb 24, 2019 at 09:17:10AM +0100, Greg KH wrote:
> On Sat, Feb 23, 2019 at 10:55:33AM -0500, Sasha Levin wrote:
> > On Sat, Feb 23, 2019 at 09:57:15AM +0100, Greg KH wrote:
> > > On Fri, Feb 22, 2019 at 10:12:25PM -0500, Sasha Levin wrote:
> > > > -----BEGIN PGP SIGNED MESSAGE-----
> > > > Hash: SHA512
> > > >
> > > > The following changes since commit 8834f5600cf3c8db365e18a3d5cac2c2780c81e5:
> > > >
> > > > Linux 5.0-rc5 (2019-02-03 13:48:04 -0800)
> > > >
> > > > are available in the Git repository at:
> > > >
> > > > git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git tags/hyperv-fixes-signed
> > > >
> > > > for you to fetch changes up to b2946cd86f3c1b5b1262c0ec06068110c2328fe6:
> > > >
> > > > MAINTAINERS: Change mailing list for Hyper-V CORE AND DRIVERS (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.
> > > >
> > > > 2. Update the Hyper-V mailing list to a new one created on
> > > > vger.kernel.org, by Haiyang Zhang.
> > > >
> > > > - ----------------------------------------------------------------
> > > > Haiyang Zhang (1):
> > > > MAINTAINERS: Change mailing list for Hyper-V CORE AND DRIVERS
> > > >
> > > > Kimberly Brown (2):
> > > > Drivers: hv: vmbus: Change server monitor_pages index to 0
> > > > Drivers: hv: vmbus: Return -EINVAL if monitor_allocated not set
> > >
> > > I objected to this last patch when it was posted on the list. The sysfs
> > > file should just not be present if the functionality is not there, no
> > > need to add the "-EINVAL" logic to it instead.
> > >
> > > Having a sysfs file that says it can be read, and then rejecting that
> > > read with an error is NOT ok.
> >
> > Hm, I'm sorry but I didn't see an objection on the thread
> > (https://lore.kernel.org/lkml/20190122020759.GA4054@ubu-Virtual-Machine/)
> > which is why it was sent in like this.
> >
> > Could you please point me to it so we can get the patch fixed up?
>
> My response was Message-ID: <[email protected]> sent:
> Date: Tue, 19 Feb 2019 07:17:48 +0100
> but for some reason I do not see it on lore.kernel.org at all :(
>
> I don't know what happened to it, sorry, it was also cc: to you.
>
> Anyway, it just said what I said here, don't do this type of thing, if
> the sysfs file is not valid for a specific device, just do not create
> it, do not mess around with returning error values when trying to read
> from it.
>

I didn't receive that email either.

Thanks for the feedback. I'll start looking into a new fix for this.

Kim

> thanks,
>
> greg k-h