From: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
To: Shuah Khan <shuahkh@osg.samsung.com>
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: add dump_stack() if called in atomic context
Date: Sun, 13 Mar 2016 08:43:56 -0300 [thread overview]
Message-ID: <20160313084356.0fc39c56@recife.lan> (raw)
In-Reply-To: <1457829425-4411-1-git-send-email-shuahkh@osg.samsung.com>
Em Sat, 12 Mar 2016 17:37:05 -0700
Shuah Khan <shuahkh@osg.samsung.com> escreveu:
> Change media_add_link() and media_devnode_create() to dump_stack when
> called in atomic context.
>
> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
> Suggested-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Just to be clear: my suggestion is to use this in order to help you to
debug the issues with au0828/snd-usb-audio, that are sometimes producing
those Kernel messages:
[ 23.267197] BUG: sleeping function called from invalid context at mm/slub.c:1289
But I don't think that should patch should be merged upstream.
Regards,
Mauro
> ---
> drivers/media/media-entity.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c
> index e95070b..66a5392 100644
> --- a/drivers/media/media-entity.c
> +++ b/drivers/media/media-entity.c
> @@ -570,6 +570,9 @@ static struct media_link *media_add_link(struct list_head *head)
> {
> struct media_link *link;
>
> + if (in_atomic())
> + dump_stack();
> +
> link = kzalloc(sizeof(*link), GFP_KERNEL);
> if (link == NULL)
> return NULL;
> @@ -891,6 +894,9 @@ struct media_intf_devnode *media_devnode_create(struct media_device *mdev,
> {
> struct media_intf_devnode *devnode;
>
> + if (in_atomic())
> + dump_stack();
> +
> devnode = kzalloc(sizeof(*devnode), GFP_KERNEL);
> if (!devnode)
> return NULL;
--
Thanks,
Mauro
prev parent reply other threads:[~2016-03-13 11:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-13 0:37 [PATCH] media: add dump_stack() if called in atomic context Shuah Khan
2016-03-13 11:43 ` Mauro Carvalho Chehab [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=20160313084356.0fc39c56@recife.lan \
--to=mchehab@osg.samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=shuahkh@osg.samsung.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).