* RE: [PATCH RESEND] qib:Fix concurrent access in the function, qib_init_iba6120_funcs
[not found] <1457323126-19686-1-git-send-email-xerofoify@gmail.com>
@ 2016-03-07 16:34 ` Marciniszyn, Mike
2016-03-07 20:49 ` Leon Romanovsky
[not found] ` <56DDD4B9.5070802@gmail.com>
0 siblings, 2 replies; 3+ messages in thread
From: Marciniszyn, Mike @ 2016-03-07 16:34 UTC (permalink / raw)
To: Nicholas Krause
Cc: dledford, Hefty, Sean, hal.rosenstock, linux-rdma, linux-kernel
> 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.
Are you actually having an issue with this older version of a qib card?
The other board specific routines if this indeed is an issue, would need to be fixed as well since that have the same chip specific routine.
Mike
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH RESEND] qib:Fix concurrent access in the function, qib_init_iba6120_funcs
2016-03-07 16:34 ` [PATCH RESEND] qib:Fix concurrent access in the function, qib_init_iba6120_funcs Marciniszyn, Mike
@ 2016-03-07 20:49 ` Leon Romanovsky
[not found] ` <56DDD4B9.5070802@gmail.com>
1 sibling, 0 replies; 3+ messages in thread
From: Leon Romanovsky @ 2016-03-07 20:49 UTC (permalink / raw)
To: Marciniszyn, Mike
Cc: Nicholas Krause, dledford, Hefty, Sean, hal.rosenstock,
linux-rdma, linux-kernel
On Mon, Mar 07, 2016 at 04:34:04PM +0000, 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.
>
> Are you actually having an issue with this older version of a qib card?
IMHO no,
The author is famous developer - Nick Krause [1].
[1]
http://news.softpedia.com/news/Malevolent-Developer-Trolls-Linux-Kernel-Development-with-Lots-of-Broken-Patches-453709.shtml
>
> The other board specific routines if this indeed is an issue, would need to be fixed as well since that have the same chip specific routine.
>
> Mike
>
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH RESEND] qib:Fix concurrent access in the function, qib_init_iba6120_funcs
[not found] ` <56DDD4B9.5070802@gmail.com>
@ 2016-03-07 21:17 ` Marciniszyn, Mike
0 siblings, 0 replies; 3+ messages in thread
From: Marciniszyn, Mike @ 2016-03-07 21:17 UTC (permalink / raw)
To: nick; +Cc: dledford, Hefty, Sean, hal.rosenstock, linux-rdma, linux-kernel
> From: nick [mailto:xerofoify@gmail.com]
> Sent: Monday, March 7, 2016 2:21 PM
> To: Marciniszyn, Mike <mike.marciniszyn@intel.com>
> Cc: dledford@redhat.com; Hefty, Sean <sean.hefty@intel.com>;
> hal.rosenstock@gmail.com; linux-rdma@vger.kernel.org; linux-
> kernel@vger.kernel.org
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-03-07 21:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1457323126-19686-1-git-send-email-xerofoify@gmail.com>
2016-03-07 16:34 ` [PATCH RESEND] qib:Fix concurrent access in the function, qib_init_iba6120_funcs Marciniszyn, Mike
2016-03-07 20:49 ` Leon Romanovsky
[not found] ` <56DDD4B9.5070802@gmail.com>
2016-03-07 21:17 ` Marciniszyn, Mike
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®