[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5ec2d185-0359-b0df-664a-d20722fe3666@ispras.ru>
Date: Tue, 16 Jul 2024 12:45:22 +0300
From: Alexey Khoroshilov <khoroshilov@...ras.ru>
To: Nikita Kiryushin <kiryushin@...ud.ru>,
Steven Rostedt <rostedt@...dmis.org>
Cc: lvc-project@...uxtesting.org, linux-trace-kernel@...r.kernel.org,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Masami Hiramatsu <mhiramat@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [lvc-project] [PATCH] tracing: remove unreachable trace_array_put
On 15.07.2024 16:47, Nikita Kiryushin wrote:
> As nonseekable_open() documentation states:
> "The function is not supposed to ever fail, the only
> reason it returns an 'int' and not 'void' is so that it can be plugged
> directly into file_operations structure."
>
> So it seems, that it will not fail anytime as it is not meant to?
> Otherwise,
> there will be a huge problem with leaks in many other parts of code, as
> there are plenty of places, where nonseekable_open() is not checked after
> resource allocations.
Yes, but there is another possible modification: replacement of call to
nonseekable_open() by a call to some other function that returns error.
Current code is already ready for such modification.
--
Alexey
Powered by blists - more mailing lists