From: Andreas Oberritter <obi@linuxtv.org>
To: Matthias Schwarzott <zzam@gentoo.org>
Cc: linux-media@vger.kernel.org,
Mauro Carvalho Chehab <mchehab@redhat.com>,
Steven Toth <stoth@linuxtv.org>
Subject: Re: [PATCH] Use kzalloc for frontend states to have struct dvb_frontend properly initialized
Date: Fri, 19 Jun 2009 14:12:13 +0200 [thread overview]
Message-ID: <4A3B809D.7050709@linuxtv.org> (raw)
In-Reply-To: <200906191321.05477.zzam@gentoo.org>
Hello Matthias,
Matthias Schwarzott wrote:
> This patch changes most frontend drivers to allocate their state structure via
> kzalloc and not kmalloc. This is done to properly initialize the
> embedded "struct dvb_frontend frontend" field, that they all have.
>
> The visible effect of this struct being uninitalized is, that the member "id"
> that is used to set the name of kernel thread is totally random.
>
> Some board drivers (for example cx88-dvb) set this "id" via
> videobuf_dvb_alloc_frontend but most do not.
>
> So I at least get random id values for saa7134, flexcop and ttpci based cards.
> It looks like this in dmesg:
> DVB: registering adapter 1 frontend -10551321 (ST STV0299 DVB-S)
>
> The related kernel thread then also gets a strange name
> like "kdvb-ad-1-fe--1".
>
> Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
I still think that this id doesn't belong into struct dvb_frontend and
should be private to the drivers, but using kzalloc is a good idea in
every case. Did you verify that none of the drivers does an additional
memset? If so, you can add my "Acked-by: Andreas Oberritter
<obi@linuxtv.org>".
Regards,
Andreas
next prev parent reply other threads:[~2009-06-19 12:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-19 11:21 [PATCH] Use kzalloc for frontend states to have struct dvb_frontend properly initialized Matthias Schwarzott
2009-06-19 12:12 ` Andreas Oberritter [this message]
2009-06-19 12:41 ` Matthias Schwarzott
2009-06-19 13:15 ` Devin Heitmueller
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=4A3B809D.7050709@linuxtv.org \
--to=obi@linuxtv.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@redhat.com \
--cc=stoth@linuxtv.org \
--cc=zzam@gentoo.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.