From: Vandana BN <bnvandana@gmail.com>
To: Akihiro TSUKADA <tskd08@gmail.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org
Subject: Re: [PATCH] media:dvb-frontends:Return if Max devices are added in dvb_pll_attach().
Date: Thu, 18 Jul 2019 14:40:14 +0530 [thread overview]
Message-ID: <1c150bc5-0b15-23bf-2170-758c9cc046e3@gmail.com> (raw)
In-Reply-To: <f8d9af33-d7d8-22d1-428f-b7b7c1d84062@gmail.com>
On 18/07/19 6:05 AM, Akihiro TSUKADA wrote:
> Hi,
>
>> diff --git a/drivers/media/dvb-frontends/dvb-pll.c b/drivers/media/dvb-frontends/dvb-pll.c
>> index ba0c49107bd2..c850f1d69bce 100644
>> --- a/drivers/media/dvb-frontends/dvb-pll.c
>> +++ b/drivers/media/dvb-frontends/dvb-pll.c
>> @@ -788,6 +788,9 @@ struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, int pll_addr,
>> int ret;
>> const struct dvb_pll_desc *desc;
>>
>> + if (dvb_pll_devcount > DVB_PLL_MAX - 1)
>> + return NULL;
>> +
>> b1 = kmalloc(1, GFP_KERNEL);
>> if (!b1)
>> return NULL;
>>
> Wouldn't it put a limit on the number of attachment of devices?
> I'm afraid that an user may repeatedly plugs in and off a device
> using this driver (for some reason), and finally gets an error.
>
> Since dvb_pll_devcount and "id" module parameter are just used
> for debugging purpose to override/force PLL type,
> removing them totally would be better, IMHO.
Hi,
Thanks for reviewing the patch.
Will it be better, if dvb_pll_devcount is decremented in dvb_pll_release(), instead of removing module params?
Regards,
Vandana.
>
> regards,
> Akihiro
next prev parent reply other threads:[~2019-07-18 9:10 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-17 14:12 [PATCH] media:dvb-frontends:Return if Max devices are added in dvb_pll_attach() Vandana BN
2019-07-18 0:35 ` Akihiro TSUKADA
2019-07-18 9:10 ` Vandana BN [this message]
2019-07-19 1:41 ` Akihiro TSUKADA
2019-07-19 7:02 ` Vandana BN
2019-07-20 6:13 ` [PATCH v2] media:dvb-frontends:Remove dvb_pll_devcount and id module parameters Vandana BN
2019-07-24 5:36 ` Sean Young
2019-08-01 5:09 ` Sean Young
2019-08-01 8:53 ` Vandana BN
2019-08-01 9:01 ` Michael Ira Krufky
2019-08-02 6:50 ` Vandana BN
2019-08-03 0:24 ` 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=1c150bc5-0b15-23bf-2170-758c9cc046e3@gmail.com \
--to=bnvandana@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=tskd08@gmail.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).