All of lore.kernel.org
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javier@osg.samsung.com>
To: linux-media@vger.kernel.org
Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: don't try to empty links list in media_entity_cleanup()
Date: Mon, 24 Aug 2015 22:18:56 +0200	[thread overview]
Message-ID: <55DB7C30.90804@osg.samsung.com> (raw)
In-Reply-To: <1440439073-4082-1-git-send-email-javier@osg.samsung.com>

Hello,

On 08/24/2015 07:57 PM, Javier Martinez Canillas wrote:
> The media_entity_cleanup() function only cleans up the entity links list
> but this operation is already made in media_device_unregister_entity().
> 
> In most cases this should be harmless (besides having duplicated code)
> since the links list would be empty so the iteration would not happen
> but the links list is initialized in media_device_register_entity() so
> if a driver fails to register an entity with a media device and clean up
> the entity in the error path, a NULL deference pointer error will happen.
> 
> So don't try to empty the links list in media_entity_cleanup() since
> is either done already or haven't been initialized yet.
> 
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
> 

I forgot to mention that this patch depends on Mauro's
"[PATCH v7 00/44] MC next generation patches" [0].

Sorry for missing that.

[0]: https://www.mail-archive.com/linux-media@vger.kernel.org/msg91528.html

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

      reply	other threads:[~2015-08-24 20:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-24 17:57 [PATCH] media: don't try to empty links list in media_entity_cleanup() Javier Martinez Canillas
2015-08-24 20:18 ` Javier Martinez Canillas [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=55DB7C30.90804@osg.samsung.com \
    --to=javier@osg.samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@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 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.