Andy Shevchenko
6fda593f30
gpio: mockup: Convert to use software nodes
...
The gpio-mockup driver creates the properties that are shared between
platform and GPIO devices. Because of that, the properties may not
be removed at the proper point of time without provoking a use-after-free
as shown in the following backtrace:
refcount_t: underflow; use-after-free.
WARNING: CPU: 0 PID: 103 at lib/refcount.c:28 refcount_warn_saturate+0xd1/0x120
...
Call Trace:
kobject_put+0xdc/0xf0
software_node_notify_remove+0xa8/0xc0
device_del+0x15a/0x3e0
That's why the driver has to manage the lifetime of the software nodes
by itself.
The problem originates from the old device_add_properties() API, but
has been only revealed after the commit bd1e336aa853 ("driver core: platform:
Remove platform_device_add_properties()"). Hence, it's used as a landmark
for backporting.
Fixes: bd1e336aa853 ("driver core: platform: Remove platform_device_add_properties()")
Reported-by: Kent Gibson <warthog618@gmail.com>
Tested-by: Kent Gibson <warthog618@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
[Bartosz: tweaked local variable placement]
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2021-10-06 13:04:04 +02:00
..
2021-10-06 13:01:45 +02:00
2019-11-07 09:27:48 +01:00
2021-08-12 11:39:38 +01:00
2021-08-12 11:39:38 +01:00
2021-08-12 11:39:38 +01:00
2020-07-20 15:34:59 +02:00
2021-05-21 15:29:53 +02:00
2020-07-20 15:47:50 +02:00
2021-05-05 16:07:40 +02:00
2021-05-21 15:43:24 +02:00
2021-08-12 11:39:38 +01:00
2020-12-08 09:41:32 +01:00
2020-09-28 12:22:04 +02:00
2019-07-09 09:07:00 -07:00
2020-12-02 10:40:54 +01:00
2021-09-22 11:23:10 +02:00
2021-08-12 11:39:38 +01:00
2021-08-12 11:39:38 +01:00
2021-08-12 11:39:38 +01:00
2021-05-21 15:43:26 +02:00
2021-02-15 11:43:27 +01:00
2021-04-14 10:19:22 +01:00
2021-02-15 11:43:27 +01:00
2021-09-07 12:27:27 -07:00
2020-12-08 09:41:32 +01:00
2021-08-12 11:39:38 +01:00
2019-05-30 11:26:32 -07:00
2020-01-23 16:16:05 +01:00
2021-05-17 10:56:17 +03:00
2020-12-12 01:37:46 +01:00
2021-05-23 20:32:09 +02:00
2021-05-21 14:45:57 +02:00
2021-08-12 11:39:38 +01:00
2021-08-12 11:39:38 +01:00
2021-08-11 16:01:06 +03:00
2020-12-09 09:41:49 +01:00
2021-08-12 11:39:38 +01:00
2021-08-12 11:39:38 +01:00
2020-11-25 15:36:52 +01:00
2020-05-05 18:22:26 +02:00
2021-08-12 11:39:38 +01:00
2018-05-16 14:35:24 +02:00
2019-12-04 19:44:12 -08:00
2020-01-15 11:24:19 +01:00
2019-02-09 11:33:37 +01:00
2021-08-12 11:39:38 +01:00
2021-08-12 11:39:38 +01:00
2019-11-07 09:27:48 +01:00
2021-05-05 16:07:41 +02:00
2021-06-11 20:57:59 +02:00
2019-07-15 21:10:39 -07:00
2021-05-05 16:07:41 +02:00
2019-09-03 16:04:19 +02:00
2019-07-09 09:07:00 -07:00
2019-11-07 09:27:48 +01:00
2021-05-12 13:35:39 +02:00
2019-04-05 00:04:26 +07:00
2019-10-31 15:03:10 -07:00
2019-11-07 09:27:48 +01:00
2019-06-05 17:37:10 +02:00
2021-05-19 13:33:49 +01:00
2019-04-05 00:04:26 +07:00
2019-08-15 21:33:07 +02:00
2019-11-07 09:27:48 +01:00
2020-05-22 17:01:25 +02:00
2020-08-04 01:12:43 +02:00
2019-12-04 19:44:13 -08:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2021-02-15 11:43:29 +01:00
2019-07-29 00:03:52 +02:00
2020-05-18 09:15:16 +02:00
2019-05-30 11:29:19 -07:00
2019-11-03 19:54:53 +01:00
2021-08-12 11:39:38 +01:00
2021-07-13 11:58:22 +03:00
2021-08-16 21:21:24 +02:00
2020-07-08 09:24:08 +02:00
2020-04-28 22:41:25 +02:00
2020-07-16 15:07:18 +02:00
2021-10-06 13:04:04 +02:00
2021-04-09 14:54:23 -07:00
2021-09-07 12:27:27 -07:00
2019-06-05 17:37:06 +02:00
2020-12-05 22:41:22 +01:00
2021-09-07 12:27:27 -07:00
2021-02-15 11:43:31 +01:00
2021-08-12 11:39:38 +01:00
2021-08-12 11:39:38 +01:00
2019-04-05 00:04:27 +07:00
2021-08-12 11:39:38 +01:00
2019-05-30 11:29:52 -07:00
2021-10-06 13:01:45 +02:00
2020-07-16 14:35:12 +02:00
2021-02-18 15:52:44 +01:00
2020-07-21 19:12:57 +03:00
2021-08-12 11:39:38 +01:00
2021-08-12 11:39:38 +01:00
2020-08-28 20:15:51 +02:00
2021-08-12 11:39:38 +01:00
2020-07-08 09:24:07 +02:00
2021-08-12 11:39:38 +01:00
2021-03-22 17:59:51 +01:00
2019-05-30 11:29:52 -07:00
2021-09-07 12:27:27 -07:00
2021-08-12 11:39:38 +01:00
2019-05-24 17:36:45 +02:00
2021-08-12 11:39:38 +01:00
2019-11-07 09:27:48 +01:00
2021-06-07 15:39:19 +02:00
2021-09-28 16:10:42 -07:00
2019-11-07 09:27:48 +01:00
2020-07-08 09:24:07 +02:00
2019-11-07 09:27:48 +01:00
2021-08-12 11:39:38 +01:00
2020-12-09 15:17:24 +01:00
2020-09-09 12:59:15 +02:00
2021-02-15 11:43:26 +01:00
2021-08-12 11:39:38 +01:00
2021-05-25 16:14:34 +02:00
2021-08-12 11:39:38 +01:00
2021-05-25 16:15:21 +02:00
2021-05-21 14:45:21 +02:00
2020-08-18 21:32:28 +02:00
2020-07-08 09:24:08 +02:00
2021-08-12 11:39:38 +01:00
2021-05-24 20:57:27 +02:00
2021-09-07 12:27:27 -07:00
2021-08-12 11:39:38 +01:00
2020-01-15 11:18:29 +01:00
2019-05-30 11:29:19 -07:00
2019-11-07 09:27:48 +01:00
2021-05-24 20:56:19 +02:00
2019-11-07 09:27:48 +01:00
2021-05-24 20:58:23 +02:00
2021-05-25 16:17:11 +02:00
2021-05-24 20:58:46 +02:00
2021-05-21 16:47:20 +02:00
2021-08-29 21:19:50 +02:00
2019-04-05 00:04:28 +07:00
2019-11-07 09:27:48 +01:00
2018-09-04 08:22:47 +02:00
2019-11-07 09:27:48 +01:00
2019-11-07 09:27:48 +01:00
2019-06-19 17:09:55 +02:00
2021-09-22 11:19:29 +02:00
2021-08-12 11:39:38 +01:00
2021-08-31 11:29:28 +02:00
2021-08-31 11:07:05 +02:00
2021-05-21 15:28:22 +02:00
2019-06-27 15:56:51 +01:00
2021-02-15 11:43:29 +01:00
2021-05-27 09:51:35 +02:00
2021-05-20 15:20:52 +03:00
2018-01-09 14:51:00 +01:00
2021-05-25 16:20:58 +02:00
2021-05-25 16:21:28 +02:00
2021-05-25 16:21:14 +02:00
2021-08-12 11:39:38 +01:00
2020-05-18 09:16:31 +02:00
2021-05-23 20:30:26 +02:00
2021-08-12 11:39:38 +01:00
2021-08-12 11:39:38 +01:00
2021-08-12 11:39:38 +01:00
2020-11-30 17:36:36 +01:00
2019-12-09 10:40:18 +01:00
2019-06-19 17:09:55 +02:00
2021-08-12 11:39:38 +01:00
2021-09-22 11:16:42 +02:00
2021-03-26 14:56:18 +01:00
2021-06-22 09:54:13 +02:00
2020-11-05 15:35:40 +01:00
2021-08-05 21:21:58 +02:00
2018-09-25 09:08:48 +02:00
2021-08-05 21:22:22 +02:00
2021-01-27 16:04:10 +01:00
2021-05-21 14:56:10 +02:00
2020-07-12 10:22:00 +02:00
2021-07-29 19:41:12 +02:00
2020-12-09 15:17:24 +01:00
2021-08-23 10:04:05 +02:00
2021-08-23 10:04:05 +02:00
2021-02-15 11:43:32 +01:00