lkml.org 
[lkml]   [2016]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] media: add dump_stack() if called in atomic context
Date
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>
---
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;
--
2.5.0
\
 
 \ /
  Last update: 2016-03-13 02:21    [W:0.030 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site