linux-brain/drivers/rtc
Maciej W. Rozycki 453e01cc6d rtc: hctosys: Add missing range error reporting
commit 7ce9a992ff upstream.

Fix an issue with the 32-bit range error path in `rtc_hctosys' where no
error code is set and consequently the successful preceding call result
from `rtc_read_time' is propagated to `rtc_hctosys_ret'.  This in turn
makes any subsequent call to `hctosys_show' incorrectly report in sysfs
that the system time has been set from this RTC while it has not.

Set the error to ERANGE then if we can't express the result due to an
overflow.

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Fixes: b3a5ac42ab ("rtc: hctosys: Ensure system time doesn't overflow time_t")
Cc: stable@vger.kernel.org # 4.17+
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-21 09:27:44 +01:00
..
Kconfig rtc: Add a driver for Micro Crystal RV8803 2015-11-08 14:12:32 +01:00
Makefile rtc: Add a driver for Micro Crystal RV8803 2015-11-08 14:12:32 +01:00
class.c rtc: switch to using is_visible() to control sysfs attributes 2015-09-05 13:19:07 +02:00
hctosys.c rtc: hctosys: Add missing range error reporting 2018-11-21 09:27:44 +01:00
interface.c rtc: ensure rtc_set_alarm fails when alarms are not supported 2018-08-06 16:24:30 +02:00
rtc-88pm80x.c rtc: 88pm80x: add device tree support 2015-09-05 13:19:05 +02:00
rtc-88pm860x.c
rtc-ab-b5ze-s3.c rtc: Export OF module alias information in missing drivers 2015-09-05 13:19:08 +02:00
rtc-ab3100.c drivers/rtc/ab3100: Update driver to address y2038/y2106 issues 2015-04-03 08:18:25 +02:00
rtc-ab8500.c rtc: ab8500: remove misuse of IRQF_NO_SUSPEND flag 2015-11-08 14:12:25 +01:00
rtc-abx80x.c rtc: abx80x: fix RTC write bit 2015-09-05 19:37:31 +02:00
rtc-armada38x.c rtc: Fix module autoload for OF platform drivers 2015-09-05 19:37:22 +02:00
rtc-as3722.c rtc: as3722: correct month value 2015-09-05 19:37:18 +02:00
rtc-at32ap700x.c rtc: at32ap700x: update author email 2015-06-25 01:12:50 +02:00
rtc-at91rm9200.c rtc: at91rm9200: clear RTC alarm status flag prior to suspending 2015-11-08 14:12:28 +01:00
rtc-at91rm9200.h
rtc-at91sam9.c rtc: at91sam9: remove useless include 2015-09-05 13:19:13 +02:00
rtc-au1xxx.c
rtc-bfin.c rtc: Drop (un)likely before IS_ERR(_OR_NULL) 2015-09-05 13:19:09 +02:00
rtc-bq32k.c rtc: Drop owner assignment from i2c_driver 2015-09-05 13:19:06 +02:00
rtc-bq4802.c rtc: bq4802: add error handling for devm_ioremap 2018-09-26 08:35:09 +02:00
rtc-cmos.c rtc: cmos: Do not assume irq 8 for rtc when there are no legacy irqs 2018-03-24 10:58:40 +01:00
rtc-coh901331.c rtc: Fix module autoload for OF platform drivers 2015-09-05 19:37:22 +02:00
rtc-core.h rtc: switch to using is_visible() to control sysfs attributes 2015-09-05 13:19:07 +02:00
rtc-da9052.c drivers/rtc/rtc-da9052.c: register ability of alarm to wake device from suspend 2015-04-17 09:04:00 -04:00
rtc-da9055.c
rtc-da9063.c rtc: da9063: fix access ordering error during RTC interrupt at system power on 2015-12-20 13:39:29 +01:00
rtc-davinci.c rtc: davinci: remove incorrect reference to probe function 2015-11-08 14:12:29 +01:00
rtc-dev.c rtc: dev: properly manage lifetime of dev and cdev in rtc device 2015-09-05 13:19:07 +02:00
rtc-digicolor.c rtc: driver for Conexant Digicolor CX92755 on-chip RTC 2015-04-17 09:04:01 -04:00
rtc-dm355evm.c
rtc-ds1216.c rtc: simplify use of devm_ioremap_resource 2015-06-25 01:13:40 +02:00
rtc-ds1286.c rtc: simplify use of devm_ioremap_resource 2015-06-25 01:13:40 +02:00
rtc-ds1302.c
rtc-ds1305.c spi: Drop owner assignment from spi_drivers 2015-10-28 10:30:17 +09:00
rtc-ds1307.c rtc: ds1307: fix alarm reading at probe time 2015-11-26 18:11:26 +01:00
rtc-ds1343.c RTC for 4.4 2015-11-10 10:01:21 -08:00
rtc-ds1347.c spi: Drop owner assignment from spi_drivers 2015-10-28 10:30:17 +09:00
rtc-ds1374.c rtc: ds1374: wdt: Fix stop/start ioctl always returning -EINVAL 2018-03-24 10:58:46 +01:00
rtc-ds1390.c RTC for 4.4 2015-11-10 10:01:21 -08:00
rtc-ds1511.c rtc: ds1511: clean up ds1511_nvram_read()/ds1511_nvram_write() 2015-09-05 13:19:10 +02:00
rtc-ds1553.c rtc: ds1553: clean up ds1553_nvram_read()/ds1553_nvram_write() 2015-09-05 13:19:10 +02:00
rtc-ds1672.c rtc: ds1672, max6900, max8998: Add MODULE_DEVICE_TABLE 2015-06-25 01:13:36 +02:00
rtc-ds1685.c rtc: ds1685: passing bogus values to irq_restore 2016-05-04 14:48:51 -07:00
rtc-ds1742.c rtc: ds1742: clean up ds1742_nvram_read()/ds1742_nvram_write() 2015-09-05 13:19:10 +02:00
rtc-ds2404.c
rtc-ds3232.c rtc: ds3232: fix WARNING trace in resume function 2015-09-05 19:36:21 +02:00
rtc-ds3234.c spi: Drop owner assignment from spi_drivers 2015-10-28 10:30:17 +09:00
rtc-efi-platform.c rtc: use more standard kernel logging styles 2015-04-17 09:04:02 -04:00
rtc-efi.c rtc: efi: use correct EFI 'epoch' 2015-06-25 01:13:44 +02:00
rtc-em3027.c drivers/rtc/rtc-em3027.c: add device tree support 2015-04-17 09:03:59 -04:00
rtc-ep93xx.c rtc: ep93xx: Use readl/writel for io 2015-06-25 01:13:38 +02:00
rtc-fm3130.c rtc: Drop owner assignment from i2c_driver 2015-09-05 13:19:06 +02:00
rtc-gemini.c rtc: gemini: fix ptr_ret.cocci warnings 2015-09-05 13:19:09 +02:00
rtc-generic.c
rtc-hid-sensor-time.c rtc: hid-sensor-time: Constify platform_device_id 2015-06-19 20:03:20 +02:00
rtc-hym8563.c rtc: hym8563: fix invalid year calculation 2016-05-04 14:48:51 -07:00
rtc-imxdi.c rtc: imxdi: when locked, do not fail silently 2015-06-19 20:03:21 +02:00
rtc-isl1208.c rtc: isl1208: Pass the IRQF_ONESHOT flag 2015-11-08 14:12:30 +01:00
rtc-isl12022.c rtc: Export OF module alias information in missing drivers 2015-09-05 13:19:08 +02:00
rtc-isl12057.c rtc: isl12057: enable support for the standard "wakeup-source" property 2015-11-08 14:12:30 +01:00
rtc-jz4740.c
rtc-lib.c
rtc-lp8788.c
rtc-lpc24xx.c rtc: add rtc-lpc24xx driver 2015-09-05 13:19:06 +02:00
rtc-lpc32xx.c
rtc-ls1x.c MIPS: Loongson: Naming style cleanup and rework 2015-06-21 21:53:59 +02:00
rtc-m41t80.c rtc: use more standard kernel logging styles 2015-04-17 09:04:02 -04:00
rtc-m41t93.c spi: Drop owner assignment from spi_drivers 2015-10-28 10:30:17 +09:00
rtc-m41t94.c spi: Drop owner assignment from spi_drivers 2015-10-28 10:30:17 +09:00
rtc-m48t35.c
rtc-m48t59.c rtc: m48t59: clean up m48t59_nvram_read()/m48t59_nvram_write() 2015-09-05 13:19:10 +02:00
rtc-m48t86.c
rtc-max6900.c rtc: ds1672, max6900, max8998: Add MODULE_DEVICE_TABLE 2015-06-25 01:13:36 +02:00
rtc-max6902.c spi: Drop owner assignment from spi_drivers 2015-10-28 10:30:17 +09:00
rtc-max8907.c
rtc-max8925.c
rtc-max8997.c rtc: Fix module autoload for rtc-{ab8500,max8997,s5m} drivers 2015-09-05 19:37:21 +02:00
rtc-max8998.c rtc: ds1672, max6900, max8998: Add MODULE_DEVICE_TABLE 2015-06-25 01:13:36 +02:00
rtc-max77686.c rtc: max77686: Properly handle regmap_irq_get_virq() error code 2016-05-04 14:48:52 -07:00
rtc-max77802.c rtc: max77802: Report platform modalias to fix module autoload 2015-06-25 01:13:37 +02:00
rtc-mc13xxx.c rtc: mc13xxx: fix obfuscated and wrong format string 2015-06-25 01:13:35 +02:00
rtc-mcp795.c spi: Drop owner assignment from spi_drivers 2015-10-28 10:30:17 +09:00
rtc-moxart.c rtc: Fix module autoload for OF platform drivers 2015-09-05 19:37:22 +02:00
rtc-mpc5121.c rtc: Fix module autoload for OF platform drivers 2015-09-05 19:37:22 +02:00
rtc-mrst.c rtc: remove use of seq_printf return value 2015-04-15 16:35:24 -07:00
rtc-msm6242.c rtc: use more standard kernel logging styles 2015-04-17 09:04:02 -04:00
rtc-mt6397.c rtc: Fix module autoload for OF platform drivers 2015-09-05 19:37:22 +02:00
rtc-mv.c rtc: Fix module autoload for OF platform drivers 2015-09-05 19:37:22 +02:00
rtc-mxc.c rtc: mxc: add support of device tree 2015-08-05 20:03:56 +08:00
rtc-nuc900.c
rtc-omap.c rtc: omap: Fix selecting external osc 2016-11-26 09:54:53 +01:00
rtc-opal.c rtc: opal: Handle disabled TPO in opal_get_tpo_time() 2018-04-13 19:50:15 +02:00
rtc-palmas.c rtc: palmas: Initialise bb_charging flag before using it 2015-06-25 01:13:40 +02:00
rtc-pcap.c
rtc-pcf2123.c spi: Drop owner assignment from spi_drivers 2015-10-28 10:30:17 +09:00
rtc-pcf2127.c rtc: pcf2127: remove useless driver version 2015-11-08 14:12:28 +01:00
rtc-pcf8523.c rtc: Drop owner assignment from i2c_driver 2015-09-05 13:19:06 +02:00
rtc-pcf8563.c rtc: pcf8563: fix output clock rate 2017-12-20 10:04:57 +01:00
rtc-pcf8583.c rtc: Drop owner assignment from i2c_driver 2015-09-05 13:19:06 +02:00
rtc-pcf50633.c
rtc-pcf85063.c rtc: pcf85063: return an error when date is invalid 2015-11-08 14:12:26 +01:00
rtc-pl030.c
rtc-pl031.c rtc: pl031: make interrupt optional 2017-12-25 14:22:14 +01:00
rtc-pm8xxx.c
rtc-proc.c
rtc-ps3.c
rtc-puv3.c
rtc-pxa.c rtc: sa1100/pxa: convert to run-time register mapping 2015-09-05 19:37:16 +02:00
rtc-r9701.c spi: Drop owner assignment from spi_drivers 2015-10-28 10:30:17 +09:00
rtc-rc5t583.c
rtc-rk808.c rtc: rk808: Compensate for Rockchip calendar deviation on November 31st 2015-12-20 13:39:00 +01:00
rtc-rp5c01.c rtc: rp5c01: clean up rp5c01_nvram_read()/rp5c01_nvram_write() 2015-09-05 13:19:10 +02:00
rtc-rs5c313.c
rtc-rs5c348.c spi: Drop owner assignment from spi_drivers 2015-10-28 10:30:17 +09:00
rtc-rs5c372.c
rtc-rv3029c2.c
rtc-rv8803.c rtc: Add a driver for Micro Crystal RV8803 2015-11-08 14:12:32 +01:00
rtc-rx4581.c spi: Drop owner assignment from spi_drivers 2015-10-28 10:30:17 +09:00
rtc-rx8025.c rtc: rx8025: remove rv8803 id 2016-05-04 14:48:52 -07:00
rtc-rx8581.c rtc: Drop owner assignment from i2c_driver 2015-09-05 13:19:06 +02:00
rtc-s3c.c rtc: s3c: Add s3c_rtc_{enable/disable}_clk in s3c_rtc_setfreq() 2016-08-20 18:09:27 +02:00
rtc-s3c.h
rtc-s5m.c rtc: Fix module autoload for rtc-{ab8500,max8997,s5m} drivers 2015-09-05 19:37:21 +02:00
rtc-s35390a.c rtc: s35390a: improve irq handling 2017-04-08 09:53:32 +02:00
rtc-sa1100.c rtc: sa1100/pxa: convert to run-time register mapping 2015-09-05 19:37:16 +02:00
rtc-sa1100.h rtc: sa1100/pxa: convert to run-time register mapping 2015-09-05 19:37:16 +02:00
rtc-sh.c
rtc-sirfsoc.c rtc: sirfsoc: move to regmap APIs from platform-specific APIs 2015-09-05 13:19:06 +02:00
rtc-snvs.c rtc: snvs: Fix usage of snvs_rtc_enable 2018-05-30 07:49:09 +02:00
rtc-spear.c rtc: simplify use of devm_ioremap_resource 2015-06-25 01:13:40 +02:00
rtc-st-lpc.c rtc: st: Update IP layout information to include Clocksource 2015-07-23 17:07:35 +01:00
rtc-starfire.c
rtc-stk17ta8.c rtc: stk17ta8: clean up stk17ta8_nvram_read()/stk17ta8_nvram_write() 2015-09-05 13:19:10 +02:00
rtc-stmp3xxx.c rtc: stmp3xxx: unify register access macros 2015-11-08 14:12:27 +01:00
rtc-sun4v.c
rtc-sun6i.c rtc: sun6i: Switch to the external oscillator 2017-03-12 06:37:30 +01:00
rtc-sunxi.c rtc: sunxi: Replace deprecated rtc_tm_to_time() 2015-06-25 01:13:42 +02:00
rtc-sysfs.c rtc: switch to using is_visible() to control sysfs attributes 2015-09-05 13:19:07 +02:00
rtc-tegra.c rtc: tegra: Implement clock handling 2017-04-21 09:30:07 +02:00
rtc-test.c drivers/rtc/test: Update driver to address y2038/y2106 issues 2015-04-03 08:18:24 +02:00
rtc-tile.c
rtc-tps6586x.c
rtc-tps65910.c
rtc-tps80031.c
rtc-twl.c rtc: use more standard kernel logging styles 2015-04-17 09:04:02 -04:00
rtc-tx4939.c rtc: tx4939: avoid unintended sign extension on a 24 bit shift 2018-05-30 07:49:14 +02:00
rtc-v3020.c rtc: rtc-v3020: use gpio_request_array() 2015-06-25 01:13:38 +02:00
rtc-vr41xx.c rtc: vr41xx: Wire up alarm_irq_enable 2016-05-04 14:48:51 -07:00
rtc-vt8500.c rtc: Fix module autoload for OF platform drivers 2015-09-05 19:37:22 +02:00
rtc-wm831x.c
rtc-wm8350.c
rtc-x1205.c drivers/rtc/rtc-x1205.c: use sign_extend32() for sign extension 2015-04-17 09:03:59 -04:00
rtc-xgene.c
rtc-zynqmp.c rtc: add xilinx zynqmp rtc driver 2015-09-05 19:37:19 +02:00
systohc.c rtc: NTP: Add CONFIG_RTC_SYSTOHC_DEVICE for NTP synchronization 2015-06-25 01:13:42 +02:00