From: Ma Ke <make24@iscas.ac.cn>
To: sean@mess.org
Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
make24@iscas.ac.cn, mchehab@kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] media: lirc: Fix error handling in lirc_register()
Date: Tue, 7 Jan 2025 09:51:43 +0800 [thread overview]
Message-ID: <20250107015143.655306-1-make24@iscas.ac.cn> (raw)
In-Reply-To: <Z3u2zVQyammNo_o3@gofer.mess.org>
Sean Young<sean@mess.org> wrote:
> Hi,
>
> On Sun, Jan 05, 2025 at 06:01:01PM +0800, Ma Ke wrote:
> > When cdev_device_add() failed, calling put_device() to explicitly
> > release dev->lirc_dev. Otherwise, it could cause the fault of the
> > reference count.
> >
> > Found by code review.
>
> Interesting find, thanks for finding and reporting.
>
> So I think the idea is right, but there is a problem. lirc_release_device()
> will do a put_device() on the rcdev, but no corresponding get_device() is
> done in this code path.
>
>
> Sean
Thank you for your reply and suggestions. Following your instructions,
I took a close look at the code. Perhaps you meant to suggest removing
the put_device() call from lirc_release_device(), effectively making
lirc_release_device() an empty function?
Looking forward to your reply.
--
Regards,
Ma Ke
next prev parent reply other threads:[~2025-01-07 1:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-05 10:01 [PATCH] media: lirc: Fix error handling in lirc_register() Ma Ke
2025-01-06 10:56 ` Sean Young
2025-01-07 1:51 ` Ma Ke [this message]
2025-01-07 10:38 ` Sean Young
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=20250107015143.655306-1-make24@iscas.ac.cn \
--to=make24@iscas.ac.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sean@mess.org \
--cc=stable@vger.kernel.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