linux/drivers/rtc
Alexandre Belloni af1ecd4b5f rtc: ensure rtc_set_alarm fails when alarms are not supported
[ Upstream commit abfdff44bc ]

When using RTC_ALM_SET or RTC_WKALM_SET with rtc_wkalrm.enabled not set,
rtc_timer_enqueue() is not called and rtc_set_alarm() may succeed but the
subsequent RTC_AIE_ON ioctl will fail. RTC_ALM_READ would also fail in that
case.

Ensure rtc_set_alarm() fails when alarms are not supported to avoid letting
programs think the alarms are working for a particular RTC when they are
not.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-08-06 16:24:30 +02:00
..
class.c
hctosys.c rtc: hctosys: Ensure system time doesn't overflow time_t 2018-05-30 07:49:10 +02:00
interface.c rtc: ensure rtc_set_alarm fails when alarms are not supported 2018-08-06 16:24:30 +02:00
Kconfig
Makefile
rtc-88pm80x.c
rtc-88pm860x.c
rtc-ab-b5ze-s3.c
rtc-ab3100.c
rtc-ab8500.c
rtc-abx80x.c
rtc-armada38x.c
rtc-as3722.c
rtc-at32ap700x.c
rtc-at91rm9200.c
rtc-at91rm9200.h
rtc-at91sam9.c
rtc-au1xxx.c
rtc-bfin.c
rtc-bq32k.c
rtc-bq4802.c
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-core.h
rtc-da9052.c
rtc-da9055.c
rtc-da9063.c
rtc-davinci.c
rtc-dev.c
rtc-digicolor.c
rtc-dm355evm.c
rtc-ds1216.c
rtc-ds1286.c
rtc-ds1302.c
rtc-ds1305.c
rtc-ds1307.c
rtc-ds1343.c
rtc-ds1347.c
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-ds1511.c
rtc-ds1553.c
rtc-ds1672.c
rtc-ds1685.c rtc: ds1685: passing bogus values to irq_restore 2016-05-04 14:48:51 -07:00
rtc-ds1742.c
rtc-ds2404.c
rtc-ds3232.c
rtc-ds3234.c
rtc-efi-platform.c
rtc-efi.c
rtc-em3027.c
rtc-ep93xx.c
rtc-fm3130.c
rtc-gemini.c
rtc-generic.c
rtc-hid-sensor-time.c
rtc-hym8563.c
rtc-imxdi.c
rtc-isl1208.c
rtc-isl12022.c
rtc-isl12057.c
rtc-jz4740.c
rtc-lib.c
rtc-lp8788.c
rtc-lpc24xx.c
rtc-lpc32xx.c
rtc-ls1x.c
rtc-m41t80.c
rtc-m41t93.c
rtc-m41t94.c
rtc-m48t35.c
rtc-m48t59.c
rtc-m48t86.c
rtc-max6900.c
rtc-max6902.c
rtc-max8907.c
rtc-max8925.c
rtc-max8997.c
rtc-max8998.c
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-mc13xxx.c
rtc-mcp795.c
rtc-moxart.c
rtc-mpc5121.c
rtc-mrst.c
rtc-msm6242.c
rtc-mt6397.c
rtc-mv.c
rtc-mxc.c
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-pcap.c
rtc-pcf2123.c
rtc-pcf2127.c
rtc-pcf8523.c
rtc-pcf8563.c rtc: pcf8563: fix output clock rate 2017-12-20 10:04:57 +01:00
rtc-pcf8583.c
rtc-pcf50633.c
rtc-pcf85063.c
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-r9701.c
rtc-rc5t583.c
rtc-rk808.c
rtc-rp5c01.c
rtc-rs5c313.c
rtc-rs5c348.c
rtc-rs5c372.c
rtc-rv3029c2.c
rtc-rv8803.c
rtc-rx4581.c
rtc-rx8025.c rtc: rx8025: remove rv8803 id 2016-05-04 14:48:52 -07:00
rtc-rx8581.c
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-s35390a.c rtc: s35390a: improve irq handling 2017-04-08 09:53:32 +02:00
rtc-sa1100.c
rtc-sa1100.h
rtc-sh.c
rtc-sirfsoc.c
rtc-snvs.c rtc: snvs: Fix usage of snvs_rtc_enable 2018-05-30 07:49:09 +02:00
rtc-spear.c
rtc-st-lpc.c
rtc-starfire.c
rtc-stk17ta8.c
rtc-stmp3xxx.c
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-sysfs.c
rtc-tegra.c rtc: tegra: Implement clock handling 2017-04-21 09:30:07 +02:00
rtc-test.c
rtc-tile.c
rtc-tps6586x.c
rtc-tps65910.c
rtc-tps80031.c
rtc-twl.c
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-vr41xx.c
rtc-vt8500.c
rtc-wm831x.c
rtc-wm8350.c
rtc-x1205.c
rtc-xgene.c
rtc-zynqmp.c
systohc.c