]> git.baikalelectronics.ru Git - kernel.git/commit
s390/time: fix clocksource steering for negative clock offsets
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 16 Nov 2016 15:36:26 +0000 (16:36 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 17 Nov 2016 05:56:38 +0000 (06:56 +0100)
commit18e537e4095ba71fc059f9689d7aacf2aa38a521
tree50814453e4dc64c4ec68dde13b09c533d6b1bf9c
parent03792ef98b10374771f1a4444cd61aef8adafc7c
s390/time: fix clocksource steering for negative clock offsets

The TOD clock offset injected by an STP sync check can be negative.
If the resulting total tod_steering_delta gets negative the kernel
will panic.

Change the type of tod_steering_delta to a signed type.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: ab2bb86f4553 ("s390/time: steer clocksource on STP sync events")
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/time.c