From: Nikita Kiryushin <kiryushin@ancud.ru>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Masami Hiramatsu <mhiramat@kernel.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
lvc-project@linuxtesting.org
Subject: Re: [PATCH] tracing: remove unreachable trace_array_put
Date: Mon, 15 Jul 2024 16:47:36 +0300 [thread overview]
Message-ID: <98c01cc6-dcee-46d0-bdc8-0e35165ec68b@ancud.ru> (raw)
In-Reply-To: <20240712193306.3174c85e@gandalf.local.home>
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.
On 7/13/24 02:33, Steven Rostedt wrote:
> Then why does it return a value?
>
> If someday it can return a failure, this would then cause a leak. It
> doesn't hurt to leave it in.
>
> So NACK.
>
> -- Steve
>
next prev parent reply other threads:[~2024-07-15 13:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-12 20:12 Nikita Kiryushin
2024-07-12 23:33 ` Steven Rostedt
2024-07-15 13:47 ` Nikita Kiryushin [this message]
2024-07-16 9:45 ` [lvc-project] " Alexey Khoroshilov
2024-07-16 19:19 ` Nikita Kiryushin
2024-07-16 19:34 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=98c01cc6-dcee-46d0-bdc8-0e35165ec68b@ancud.ru \
--to=kiryushin@ancud.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=lvc-project@linuxtesting.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®