1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-18 20:40:22 +00:00
Akinobu Mita d472cf797c debugfs: fix error when writing negative value to atomic_t debugfs file
The simple attribute files do not accept a negative value since the commit
488dac0c9237 ("libfs: fix error cast of negative value in
simple_attr_write()"), so we have to use a 64-bit value to write a
negative value for a debugfs file created by debugfs_create_atomic_t().

This restores the previous behaviour by introducing
DEFINE_DEBUGFS_ATTRIBUTE_SIGNED for a signed value.

Link: https://lkml.kernel.org/r/20220919172418.45257-4-akinobu.mita@gmail.com
Fixes: 488dac0c9237 ("libfs: fix error cast of negative value in simple_attr_write()")
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Reported-by: Zhao Gongyi <zhaogongyi@huawei.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Rafael J. Wysocki <rafael@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Wei Yongjun <weiyongjun1@huawei.com>
Cc: Yicong Yang <yangyicong@hisilicon.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-11-30 16:13:16 -08:00
..
2022-10-10 09:27:46 -07:00
2022-10-07 16:48:26 -07:00
2022-10-07 16:13:55 -07:00
2022-10-26 17:38:46 -07:00
2022-10-13 09:58:42 -07:00
2022-10-07 16:48:26 -07:00
2022-10-10 13:28:06 -07:00
2022-09-21 11:18:28 +09:00
2022-09-26 12:19:12 -07:00
2022-09-26 19:46:29 -07:00
2022-09-26 10:13:13 -07:00
2022-09-26 10:13:13 -07:00
2022-10-14 13:03:00 -07:00
2022-10-17 18:52:43 -07:00
2022-09-15 09:32:06 -07:00
2022-10-10 10:21:22 -07:00
2022-09-26 10:13:14 -07:00
2022-11-18 13:55:06 -08:00
2022-10-10 19:45:17 -07:00
2022-10-17 13:49:45 +02:00
2022-10-03 14:02:45 -07:00
2022-11-18 13:55:07 -08:00
2022-10-10 13:28:06 -07:00
2022-09-08 12:59:00 -06:00
2022-09-26 13:31:20 +02:00
2022-10-03 14:03:19 -07:00
2022-10-07 10:48:49 -07:00
2022-10-03 17:51:52 -07:00
2022-09-26 19:46:18 -07:00
2022-10-03 14:03:19 -07:00
2022-09-26 10:13:13 -07:00
2022-10-03 17:34:32 -07:00
2022-09-26 19:46:27 -07:00
2022-09-26 19:46:09 -07:00
2022-10-11 11:08:18 -07:00
2022-10-17 16:32:05 +02:00
2022-10-04 20:52:38 +02:00
2022-10-11 17:42:58 -06:00
2022-09-19 06:17:05 -07:00
2022-10-11 17:42:58 -06:00
2022-10-09 14:05:15 -07:00
2022-10-10 09:10:28 -07:00
2022-09-07 12:42:25 +01:00
2022-09-29 15:20:29 +02:00
2022-09-22 16:12:34 +02:00
2022-09-22 16:12:34 +02:00
2022-09-16 10:56:08 +01:00
2022-10-07 09:32:40 -04:00
2022-10-07 08:10:52 -06:00
2022-09-26 19:46:18 -07:00
2022-09-26 19:46:18 -07:00
2022-09-28 10:00:16 +02:00