RE: [PATCH RESEND] qib:Fix concurrent access in the function, qib_init_iba6120_funcs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: nick [mailto:xerofoify@xxxxxxxxx]
> Sent: Monday, March 7, 2016 2:21 PM
> To: Marciniszyn, Mike <mike.marciniszyn@xxxxxxxxx>
> Cc: dledford@xxxxxxxxxx; Hefty, Sean <sean.hefty@xxxxxxxxx>;
> hal.rosenstock@xxxxxxxxx; linux-rdma@xxxxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH RESEND] qib:Fix concurrent access in the function,
> qib_init_iba6120_funcs
> 
> 
> 
> On 2016-03-07 11:34 AM, Marciniszyn, Mike wrote:
> >> This fixes concurrent access in the function, qib_init_iba6120_funcs
> >> by locking around the calls to when setting up f_sendctrl and
> >> f_set_armlauch function pointers to the functions, sendctrl_6120_mod
> >> qib_set_6120_armlaunch due to these functions needing to have their
> >> caller to hold the spinlock that is part of the qib_ibport pointer
> >> they are using and due to the lock not being held by higher up
> >> functions in the caller stack we need to hold it in qib_init_iba6210 to avoid
> conncurrent access when setting up these function pointers.
> >>
> >
> > I'm not sure I agree.
> >
> > static struct pci_driver qib_driver = {
> >         .name = QIB_DRV_NAME,
> >         .probe = qib_init_one,
> >         .remove = qib_remove_one,
> >         .id_table = qib_pci_tbl,
> >         .err_handler = &qib_pci_err_handler, };
> >
> > The only caller is the probe function, which naturally protects since the device
> cannot be used until the probe returns.
> >
> That's correct my concern was about threads from other kernel contexts but
> then again that's probably me being too conservative about critical region
> protection.
> Cheers,
> Nick

Doug, I'm NAKing this patch based on this reply from Nick.

Given that function vectors cannot be used until the qib_init_iba6120_funcs() functions return, this patch just not needed.

Mike


��.n��������+%������w��{.n�����{���fk��ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux