]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
s390/stp: add locking to sysfs functions
authorSven Schnelle <svens@linux.ibm.com>
Tue, 15 Sep 2020 06:53:50 +0000 (08:53 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Thu, 10 Dec 2020 11:03:17 +0000 (12:03 +0100)
commitf70657373d571d37a32d9c16737d66bb9bd6eaf9
tree564445b43da97e94d57acec0555781a4033b54a7
parent6242025079f2fcb567220f6b48d70031a6c29b7c
s390/stp: add locking to sysfs functions

BugLink: https://bugs.launchpad.net/bugs/1904450
commit b3bd02495cb339124f13135d51940cf48d83e5cb upstream.

The sysfs function might race with stp_work_fn. To prevent that,
add the required locking. Another issue is that the sysfs functions
are checking the stp_online flag, but this flag just holds the user
setting whether STP is enabled. Add a flag to clock_sync_flag whether
stp_info holds valid data and use that instead.

Cc: stable@vger.kernel.org
Signed-off-by: Sven Schnelle <svens@linux.ibm.com>
Reviewed-by: Alexander Egorenkov <egorenar@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: William Breathitt Gray <william.gray@canonical.com>
arch/s390/kernel/time.c