All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: mchehab@osg.samsung.com
Cc: linux-media@vger.kernel.org
Subject: re: [media] media-entity: protect object creation/removal using spin lock
Date: Mon, 14 Dec 2015 22:50:53 +0300	[thread overview]
Message-ID: <20151214195053.GA15098@mwanda> (raw)

Hello Mauro Carvalho Chehab,

The patch f8fd4c61b5ae: "[media] media-entity: protect object
creation/removal using spin lock" from Dec 9, 2015, leads to the
following static checker warning:

	drivers/media/media-entity.c:781 media_remove_intf_link()
	error: dereferencing freed memory 'link'

drivers/media/media-entity.c
   777  void media_remove_intf_link(struct media_link *link)
   778  {
   779          spin_lock(&link->graph_obj.mdev->lock);
   780          __media_remove_intf_link(link);
   781          spin_unlock(&link->graph_obj.mdev->lock);

Do we need this unlock any more?  Haven't we freed the lock on the
previous line?

   782  }

regards,
dan carpenter

             reply	other threads:[~2015-12-14 19:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-14 19:50 Dan Carpenter [this message]
2015-12-14 20:00 ` [media] media-entity: protect object creation/removal using spin lock Mauro Carvalho Chehab
2015-12-14 20:04   ` Dan Carpenter
2015-12-14 22:38     ` Mauro Carvalho Chehab

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=20151214195053.GA15098@mwanda \
    --to=dan.carpenter@oracle.com \
    --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.