diff options
author | Dave Olson <dave.olson@qlogic.com> | 2008-12-05 22:14:38 +0300 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-12-05 22:14:38 +0300 |
commit | 3d0890985ac4dff781b7feba19fedda547314749 (patch) | |
tree | 4e18e4e70c32abf9450c223db97affb1d05dbeeb /drivers/infiniband/hw/ipath/ipath_verbs.c | |
parent | 1bf7724e093cf3071d943d53bfa4de8b8e50426b (diff) | |
download | linux-3d0890985ac4dff781b7feba19fedda547314749.tar.xz |
IB/ipath: Add locking for interrupt use of ipath_pd contexts vs free
Fixes timing race resulting in panic. Not a performance sensitive path.
Signed-off-by: Dave Olson <dave.olson@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_verbs.c')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_verbs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_verbs.c b/drivers/infiniband/hw/ipath/ipath_verbs.c index eabc4247860b..cdf0e6abd34d 100644 --- a/drivers/infiniband/hw/ipath/ipath_verbs.c +++ b/drivers/infiniband/hw/ipath/ipath_verbs.c @@ -1852,7 +1852,7 @@ unsigned ipath_get_npkeys(struct ipath_devdata *dd) } /** - * ipath_get_pkey - return the indexed PKEY from the port 0 PKEY table + * ipath_get_pkey - return the indexed PKEY from the port PKEY table * @dd: the infinipath device * @index: the PKEY index */ @@ -1860,6 +1860,7 @@ unsigned ipath_get_pkey(struct ipath_devdata *dd, unsigned index) { unsigned ret; + /* always a kernel port, no locking needed */ if (index >= ARRAY_SIZE(dd->ipath_pd[0]->port_pkeys)) ret = 0; else |