public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* infiniband BKL leftovers
@ 2009-10-10 18:37 Thomas Gleixner
  2009-10-11 17:42 ` Roland Dreier
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Gleixner @ 2009-10-10 18:37 UTC (permalink / raw)
  To: Roland Dreier; +Cc: LKML

Roland,

I'm looking into removing cycle_kernel_lock() from
drivers/infiniband/hw/ipath/ipath_file_ops.c .

cycle_kernel_lock() was pushed down into open functions to "emulate"
the previous BKL protected semantics by "serializing" the open
function against driver init in progress. Nobody knows how effective
this "serialization" was in reality. :)

This protection is not necessary when everything what might be needed
by write/aio_write/poll/mmap should be in place before
ipath_user_add() creates the device node.

But looking at the callsite ipath_init_one() I'm not so sure about that.

At the end of ipath_init_one() I see:

        ipath_device_create_group(&pdev->dev, dd);
        ipathfs_add_device(dd);
        ipath_user_add(dd);
        ipath_diag_add(dd);
        ipath_register_ib_device(dd);

ipath_user_add() is called before ipath_register_ib_device() which
registers the device with the infiniband core. That makes me wonder
whether the device node is really ready to use right after it is
created.

Aside of that I noticed that all the functions above have elaborate
error pathes, but non of the return values of these functions is ever
checked. Intersting approach :)

Thanks,

	tglx



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

end of thread, other threads:[~2009-10-14 15:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-10 18:37 infiniband BKL leftovers Thomas Gleixner
2009-10-11 17:42 ` Roland Dreier
2009-10-11 19:27   ` Roland Dreier
2009-10-11 19:52     ` Thomas Gleixner
2009-10-14 15:51   ` [tip:bkl/drivers] inifiband: Remove BKL from ipath_open() tip-bot for Thomas Gleixner

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