linux/drivers/rtc
Xulin Sun 9bde0afb7a rtc: pcf2127: fix a kmemleak caused in pcf2127_i2c_gather_write
pcf2127_i2c_gather_write() allocates memory as local variable
for i2c_master_send(), after finishing the master transfer,
the allocated memory should be freed. The kmemleak is reported:

unreferenced object 0xffff80231e7dba80 (size 64):
  comm "hwclock", pid 27762, jiffies 4296880075 (age 356.944s)
  hex dump (first 32 bytes):
    03 00 12 03 19 02 11 13 00 80 98 18 00 00 ff ff ................
    00 50 00 00 00 00 00 00 02 00 00 00 00 00 00 00 .P..............
  backtrace:
    [<ffff000008221398>] create_object+0xf8/0x278
    [<ffff000008a96264>] kmemleak_alloc+0x74/0xa0
    [<ffff00000821070c>] __kmalloc+0x1ac/0x348
    [<ffff0000087ed1dc>] pcf2127_i2c_gather_write+0x54/0xf8
    [<ffff0000085fd9d4>] _regmap_raw_write+0x464/0x850
    [<ffff0000085fe3f4>] regmap_bulk_write+0x1a4/0x348
    [<ffff0000087ed32c>] pcf2127_rtc_set_time+0xac/0xe8
    [<ffff0000087eaad8>] rtc_set_time+0x80/0x138
    [<ffff0000087ebfb0>] rtc_dev_ioctl+0x398/0x610
    [<ffff00000823f2c0>] do_vfs_ioctl+0xb0/0x848
    [<ffff00000823fae4>] SyS_ioctl+0x8c/0xa8
    [<ffff000008083ac0>] el0_svc_naked+0x34/0x38
    [<ffffffffffffffff>] 0xffffffffffffffff

Signed-off-by: Xulin Sun <xulin.sun@windriver.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
2018-11-07 17:13:56 +01:00
..
class.c rtc: unexport non devm managed registration 2018-09-13 15:43:05 +02:00
hctosys.c rtc: hctosys: Add missing range error reporting 2018-11-07 17:13:55 +01:00
interface.c rtc: remove irq_task from kerneldoc 2018-09-13 15:43:07 +02:00
Kconfig rtc: ds1685: drop RTC_DS1685_PROC_REGS 2018-09-28 14:21:00 +02:00
Makefile rtc: reorder Makefile entries 2018-09-28 14:20:58 +02:00
nvmem.c
rtc-88pm80x.c
rtc-88pm860x.c
rtc-ab-b5ze-s3.c
rtc-ab3100.c
rtc-ab8500.c rtc: ab8500: remove useless check 2018-09-28 14:36:49 +02:00
rtc-abx80x.c rtc: abx80x: add basic watchdog support 2018-09-12 12:02:21 +02:00
rtc-ac100.c
rtc-armada38x.c rtc: armada38x: switch to rtc_time64_to_tm/rtc_tm_to_time64 2018-09-28 14:21:03 +02:00
rtc-as3722.c
rtc-asm9260.c
rtc-at91rm9200.c
rtc-at91rm9200.h
rtc-at91sam9.c
rtc-au1xxx.c
rtc-bq32k.c
rtc-bq4802.c
rtc-brcmstb-waketimer.c
rtc-cmos.c rtc: cmos: Do not export alarm rtc_ops when we do not support alarms 2018-11-07 17:13:55 +01:00
rtc-coh901331.c
rtc-core.h rtc: move rtc_add_group/s definitions 2018-09-28 14:20:59 +02:00
rtc-cpcap.c
rtc-cros-ec.c
rtc-da9052.c
rtc-da9055.c
rtc-da9063.c
rtc-davinci.c
rtc-dev.c rtc: simplify rtc_irq_set_state/rtc_irq_set_freq 2018-07-26 15:08:53 +02:00
rtc-digicolor.c
rtc-dm355evm.c
rtc-ds1216.c
rtc-ds1286.c
rtc-ds1302.c
rtc-ds1305.c
rtc-ds1307.c rtc: ds1307: fix ds1339 wakealarm support 2018-10-22 17:53:14 +02:00
rtc-ds1343.c
rtc-ds1347.c
rtc-ds1374.c
rtc-ds1390.c
rtc-ds1511.c
rtc-ds1553.c
rtc-ds1672.c
rtc-ds1685.c rtc: ds1685: simplify getting .driver_data 2018-10-22 17:53:12 +02:00
rtc-ds1742.c
rtc-ds2404.c
rtc-ds3232.c
rtc-efi-platform.c
rtc-efi.c
rtc-em3027.c
rtc-ep93xx.c
rtc-fm3130.c
rtc-ftrtc010.c
rtc-generic.c
rtc-goldfish.c
rtc-hid-sensor-time.c
rtc-hym8563.c
rtc-imxdi.c
rtc-isl1208.c rtc: isl1208: don't include core header file 2018-09-28 14:20:59 +02:00
rtc-isl12022.c
rtc-isl12026.c
rtc-jz4740.c
rtc-lib.c rtc: lib: correct documentation typo 2018-09-28 14:21:02 +02:00
rtc-lp8788.c
rtc-lpc24xx.c
rtc-lpc32xx.c
rtc-ls1x.c
rtc-m41t80.c rtc: m41t80: mark expected switch fall-through 2018-10-16 12:56:58 +02:00
rtc-m41t93.c
rtc-m41t94.c
rtc-m48t35.c
rtc-m48t59.c rtc: m48t59: remove redundant pointer 'name' 2018-07-12 21:17:36 +02:00
rtc-m48t86.c
rtc-max6900.c
rtc-max6902.c
rtc-max6916.c
rtc-max8907.c
rtc-max8925.c
rtc-max8997.c rtc: maxim: Add SPDX license identifiers 2018-08-14 23:38:45 +02:00
rtc-max8998.c rtc: maxim: Add SPDX license identifiers 2018-08-14 23:38:45 +02:00
rtc-max77686.c rtc: maxim: Add SPDX license identifiers 2018-08-14 23:38:45 +02:00
rtc-mc13xxx.c
rtc-mc146818-lib.c
rtc-mcp795.c
rtc-moxart.c
rtc-mpc5121.c
rtc-mrst.c rtc: mrst: remove set but not used variable 'valid' 2018-08-31 11:17:41 +02:00
rtc-msm6242.c
rtc-mt6397.c rtc: mt6397: fix possible race condition 2018-09-11 13:56:20 +02:00
rtc-mt7622.c
rtc-mv.c rtc: mv: let the core handle invalid alarms 2018-10-03 11:07:24 +02:00
rtc-mxc.c
rtc-mxc_v2.c
rtc-nuc900.c
rtc-omap.c rtc: omap: Cut down the shutdown time from 2 seconds to 1 sec 2018-08-27 22:51:57 +02:00
rtc-opal.c
rtc-palmas.c
rtc-pcap.c
rtc-pcf2123.c
rtc-pcf2127.c rtc: pcf2127: fix a kmemleak caused in pcf2127_i2c_gather_write 2018-11-07 17:13:56 +01:00
rtc-pcf8523.c
rtc-pcf8563.c
rtc-pcf8583.c
rtc-pcf50633.c
rtc-pcf85063.c rtc: pcf85063: preserve control register value between stop and start 2018-07-28 14:49:25 +02:00
rtc-pcf85363.c
rtc-pic32.c
rtc-pl030.c rtc: pl030: fix possible race condition 2018-09-11 13:56:35 +02:00
rtc-pl031.c rtc: pl031: switch to devm_rtc_allocate_device/rtc_register_device 2018-09-11 13:56:35 +02:00
rtc-pm8xxx.c
rtc-proc.c
rtc-ps3.c
rtc-puv3.c
rtc-pxa.c
rtc-r7301.c
rtc-r9701.c
rtc-rc5t583.c
rtc-rk808.c
rtc-rp5c01.c
rtc-rs5c313.c
rtc-rs5c348.c rtc: rs5c348: report error when time is invalid 2018-09-28 14:21:03 +02:00
rtc-rs5c372.c
rtc-rtd119x.c
rtc-rv3029c2.c
rtc-rv8803.c rtc: rv8803: add Epson RX8803 support 2018-08-27 23:24:36 +02:00
rtc-rx4581.c
rtc-rx6110.c
rtc-rx8010.c
rtc-rx8025.c
rtc-rx8581.c
rtc-s3c.c
rtc-s3c.h
rtc-s5m.c rtc: s5m: Add SPDX license identifier 2018-08-14 23:38:47 +02:00
rtc-s35390a.c rtc: s35390a: Change buf's type to u8 in s35390a_init 2018-10-22 19:29:43 +02:00
rtc-sa1100.c rtc: sa1100: don't set PIE frequency 2018-07-25 15:29:43 +02:00
rtc-sa1100.h
rtc-sc27xx.c rtc: sc27xx: Always read normal alarm when registering RTC device 2018-10-25 02:35:42 +02:00
rtc-sh.c RTC for 4.19 2018-08-20 16:30:27 -07:00
rtc-sirfsoc.c
rtc-snvs.c rtc: snvs: Add timeouts to avoid kernel lockups 2018-07-11 20:41:09 +02:00
rtc-spear.c
rtc-st-lpc.c
rtc-starfire.c
rtc-stk17ta8.c
rtc-stm32.c
rtc-stmp3xxx.c rtc: stmp3xxx: Don't reset the rtc in .probe() when watchdog is running 2018-07-11 20:42:08 +02:00
rtc-sun4v.c
rtc-sun6i.c rtc: sun6i: Use struct_size() in kzalloc() 2018-08-27 23:02:18 +02:00
rtc-sunxi.c
rtc-sysfs.c rtc: sysfs: fix NULL check in rtc_add_groups() 2018-08-27 23:03:34 +02:00
rtc-tegra.c rtc: tegra: Propagate errors from platform_get_irq() 2018-10-16 12:56:56 +02:00
rtc-test.c rtc: test: Switch to SPDX identifier 2018-09-28 14:21:00 +02:00
rtc-tps6586x.c
rtc-tps65910.c
rtc-tps80031.c
rtc-twl.c
rtc-tx4939.c rtc: tx4939: fixup nvmem name and register size 2018-09-28 14:20:59 +02:00
rtc-v3020.c
rtc-vr41xx.c rtc: vr41xx: switch to rtc_time64_to_tm/rtc_tm_to_time64 2018-10-03 11:07:22 +02:00
rtc-vt8500.c
rtc-wm831x.c
rtc-wm8350.c
rtc-x1205.c
rtc-xgene.c
rtc-zynqmp.c
systohc.c