From: Yauheni Kaliuta <yauheni.kaliuta@redhat.com>
To: Lucas De Marchi <lucas.de.marchi@gmail.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>,
linux-modules <linux-modules@vger.kernel.org>
Subject: Re: exit from log_printf()
Date: Wed, 29 Apr 2020 11:24:40 +0300 [thread overview]
Message-ID: <xuny368mhf7b.fsf@redhat.com> (raw)
In-Reply-To: <CAKi4VALCzXJdZY-ABC-tZ=wpyfM0m-CE02FdZ3nDD2q-AE8kog@mail.gmail.com> (Lucas De Marchi's message of "Tue, 28 Apr 2020 23:44:03 -0700")
Hi, Lucas!
>>>>> On Tue, 28 Apr 2020 23:44:03 -0700, Lucas De Marchi wrote:
> On Mon, Apr 27, 2020 at 5:31 AM Yauheni Kaliuta
> <yauheni.kaliuta@redhat.com> wrote:
>>
>> Hi, Lucas!
>>
>> I have a question about exit call from tools/log.c:log_printf()
>> (https://github.com/lucasdemarchi/kmod/blob/master/tools/log.c#L140)
>>
>> What is the reasoning behind that?
>>
>> At the first glance it looks a bit incorrect (pretty surprising
>> to have exit in print()).
> If we log a critical error, there's nothing we can do except
> exit. Note that this is only used by the binaries, not the
> library.
So, it should not be fatal then, right? See the usecase below.
> There's potential for abuse, but it's pretty common to have
> something with that behavior.
> Lucas De Marchi
>>
>> Discovered while trying to remove several modules when one of
>> them cannod be removed:
>>
>> $ modprobe -r libata pcspkr
>> modprobe: FATAL: Module libata is in use.
>>
>> $ lsmod | grep pcsp
>> pcspkr 16384 0
>>
>>
>> --
>> WBR,
>> Yauheni Kaliuta
>>
> --
> Lucas De Marchi
--
WBR,
Yauheni Kaliuta
prev parent reply other threads:[~2020-04-29 8:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-27 12:30 exit from log_printf() Yauheni Kaliuta
2020-04-29 6:44 ` Lucas De Marchi
2020-04-29 8:24 ` Yauheni Kaliuta [this message]
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=xuny368mhf7b.fsf@redhat.com \
--to=yauheni.kaliuta@redhat.com \
--cc=linux-modules@vger.kernel.org \
--cc=lucas.de.marchi@gmail.com \
--cc=lucas.demarchi@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).