All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Jones <michael.jones@matrix-vision.de>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>,
	Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	linux-media@vger.kernel.org, sakari.ailus@iki.fi
Subject: Re: [RFC/PATCH 1/2] v4l: Add generic board subdev  registration function
Date: Fri, 20 May 2011 09:52:38 +0200	[thread overview]
Message-ID: <4DD61DC6.10909@matrix-vision.de> (raw)
In-Reply-To: <201105200929.33226.laurent.pinchart@ideasonboard.com>

On 05/20/2011 09:29 AM, Laurent Pinchart wrote:

[snip]

>> I had an issue when tried to call request_module, to register subdev of
>> platform device type, in probe() of other platform device. Driver's
>> probe() for devices belonging same bus type cannot be nested as the bus
>> lock is taken by the driver core before entering probe(), so this would
>> lead to a deadlock.
>> That exactly happens in __driver_attach().
>>
>> For the same reason v4l2_new_subdev_board could not be called from probe()
>> of devices belonging to I2C or SPI bus, as request_module is called inside
>> of it. I'm not sure how to solve it, yet:)
> 
> Ouch. I wasn't aware of that issue. Looks like it's indeed time to fix the 
> subdev registration issue, including the module load race condition. Michael, 
> you said you have a patch to add platform subdev support, how have you avoided 
> the race condition ?

I spoke too soon. This deadlock is staring me in the face right now,
too.  Ouch, indeed.

[snip]


MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner

  reply	other threads:[~2011-05-20  7:52 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-19 18:34 [RFC/PATCH 1/2] v4l: Add generic board subdev registration function Laurent Pinchart
2011-05-19 18:34 ` [RFC/PATCH 2/2] omap3isp: Use generic " Laurent Pinchart
2011-05-20  7:14 ` [RFC/PATCH 1/2] v4l: Add generic board " Sylwester Nawrocki
2011-05-20  7:29   ` Laurent Pinchart
2011-05-20  7:52     ` Michael Jones [this message]
2011-05-20  8:53     ` Hans Verkuil
2011-05-20  9:05       ` Laurent Pinchart
2011-05-20  9:19         ` Hans Verkuil
2011-05-20  9:37           ` Laurent Pinchart
2011-05-20  9:52             ` Hans Verkuil
2011-05-20 10:12               ` Laurent Pinchart
2011-05-20 11:14                 ` Hans Verkuil
2011-05-24 12:41                   ` Laurent Pinchart
2011-05-20 10:36               ` Sylwester Nawrocki
2011-05-20 13:08     ` Guennadi Liakhovetski
2011-05-20 16:03       ` Laurent Pinchart
2011-11-07 22:35 Rick Bronson
2011-11-08 14:13 Rick Bronson

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=4DD61DC6.10909@matrix-vision.de \
    --to=michael.jones@matrix-vision.de \
    --cc=g.liakhovetski@gmx.de \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=s.nawrocki@samsung.com \
    --cc=sakari.ailus@iki.fi \
    /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.