lkml.org 
[lkml]   [2008]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH update] firewire: fix "kobject_add failed for fw* with -EEXIST"
Date
On Sunday 27 January 2008 12:20:40 pm Stefan Richter wrote:
> There is a race between shutdown and creation of devices: fw-core may
> attempt to add a device with the same name of an already existing
> device. http://bugzilla.kernel.org/show_bug.cgi?id=9828
>
> Impact of the bug: Happens rarely, forces the user to unplug and replug
> the new device to get it working.
>
> The fix moves deregistration of the minor number and device_unregister()
> into a common rw_sem protected section.
>
> We also move the ref count increment from fw_device_op_open into an
> rw_sem protected section with the lookup of the device, so that the
> device pointer can't become invalid between lookup and usage.
>
> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>

While I've got remaining issues with firewire mdraid, this does appear fix the
problem of devices racing the grab the same fw* device node, and it seems
obvious that should indeed be the case from the code changes.

Signed-off-by: Jarod Wilson <jwilson@redhat.com>

--
Jarod Wilson
jwilson@redhat.com


\
 
 \ /
  Last update: 2008-01-28 23:33    [W:0.048 / U:1.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site