public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* re: [media] media-entity: protect object creation/removal using spin lock
@ 2015-12-14 19:50 Dan Carpenter
  2015-12-14 20:00 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2015-12-14 19:50 UTC (permalink / raw)
  To: mchehab; +Cc: linux-media

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-12-14 22:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-14 19:50 [media] media-entity: protect object creation/removal using spin lock Dan Carpenter
2015-12-14 20:00 ` Mauro Carvalho Chehab
2015-12-14 20:04   ` Dan Carpenter
2015-12-14 22:38     ` Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox