lkml.org 
[lkml]   [2022]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 3/3] debugfs: fix error when writing negative value to atomic_t debugfs file
From
On 19.09.22 19:24, Akinobu Mita wrote:
> 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().

Is that comment stale?

I would ahve thought you simply document that we restore the original
behavior essentially by reverting 005747526d4f ("docs: fault-injection:
fix non-working usage of negative values") and the using
DEFINE_DEBUGFS_ATTRIBUTE_SIGNED accordingly.

>
> This restores the previous behaviour by introducing
> DEFINE_DEBUGFS_ATTRIBUTE_SIGNED for a signed value.
>
> Fixes: 488dac0c9237 ("libfs: fix error cast of negative value in simple_attr_write()")
> Reported-by: Zhao Gongyi <zhaogongyi@huawei.com>
> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>


Apart from that

Reviewed-by: David Hildenbrand <david@redhat.com>

--
Thanks,

David / dhildenb

\
 
 \ /
  Last update: 2022-09-20 10:22    [W:0.075 / U:0.796 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site