Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1450180
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4.6 010/203] IB/core: Fix bit curruption in ib_device_cap_flags structure |
| Date | 2016-07-26 00:40 +0200 |
| Message-ID | <rYWHw-2cA-19@gated-at.bofh.it> (permalink) |
| References | <rYVs7-1c6-53@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
4.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Max Gurtovoy <maxg@mellanox.com>
commit 47355b3cd7d3c9c5226bff7c449b9d269fb17fa6 upstream.
ib_device_cap_flags 64-bit expansion caused caps overlapping
and made consumers read wrong device capabilities. For example
IB_DEVICE_SG_GAPS_REG was falsely read by the iser driver causing
it to use a non-existing capability. This happened because signed
int becomes sign extended when converted it to u64. Fix this by
casting IB_DEVICE_ON_DEMAND_PAGING enumeration to ULL.
Fixes: f5aa9159a418 ('IB/core: Add arbitrary sg_list support')
Reported-by: Robert LeBlanc <robert@leblancnet.us>
Acked-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
Signed-off-by: Matan Barak <matanb@mellanox.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/rdma/ib_verbs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -217,7 +217,7 @@ enum ib_device_cap_flags {
IB_DEVICE_CROSS_CHANNEL = (1 << 27),
IB_DEVICE_MANAGED_FLOW_STEERING = (1 << 29),
IB_DEVICE_SIGNATURE_HANDOVER = (1 << 30),
- IB_DEVICE_ON_DEMAND_PAGING = (1 << 31),
+ IB_DEVICE_ON_DEMAND_PAGING = (1ULL << 31),
IB_DEVICE_SG_GAPS_REG = (1ULL << 32),
IB_DEVICE_VIRTUAL_FUNCTION = ((u64)1 << 33),
};
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 4.6 000/203] 4.6.5-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-07-26 00:30 +0200
[PATCH 4.6 017/203] powerpc/tm: Always reclaim in start_thread() for exec() class syscalls Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-07-26 00:40 +0200
[PATCH 4.6 014/203] powerpc/iommu: Remove the dependency on EEH struct in DDW mechanism Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-07-26 00:40 +0200
[PATCH 4.6 023/203] mnt: Account for MS_RDONLY in fs_fully_visible Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-07-26 00:40 +0200
[PATCH 4.6 022/203] mnt: fs_fully_visible test the proper mount for MNT_LOCKED Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-07-26 00:40 +0200
[PATCH 4.6 010/203] IB/core: Fix bit curruption in ib_device_cap_flags structure Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-07-26 00:40 +0200
[PATCH 4.6 018/203] usb: dwc2: fix regression on big-endian PowerPC/ARM systems Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-07-26 00:40 +0200
[PATCH 4.6 002/203] mac80211: fix fast_tx header alignment Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-07-26 00:40 +0200
[PATCH 4.6 012/203] IB/rdmavt: Correct qp_priv_alloc() return value test Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-07-26 00:40 +0200
[PATCH 4.6 019/203] USB: EHCI: declare hostpc register as zero-length array Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-07-26 00:40 +0200
[PATCH 4.6 013/203] IB/mlx4: Properly initialize GRH TClass and FlowLabel in AHs Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-07-26 00:40 +0200
[PATCH 4.6 016/203] powerpc/pseries: Fix IBM_ARCH_VEC_NRCORES_OFFSET since POWER8NVL was added Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-07-26 00:40 +0200
[PATCH 4.6 025/203] of: fix autoloading due to broken modalias with no compatible Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-07-26 00:40 +0200
[PATCH 4.6 020/203] USB: dont free bandwidth_mutex too early Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-07-26 00:40 +0200
[PATCH 4.6 015/203] powerpc/pseries: Fix PCI config address for DDW Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-07-26 00:40 +0200
Re: [PATCH 4.6 000/203] 4.6.5-stable review Shuah Khan <shuah.kh@samsung.com> - 2016-07-26 04:10 +0200
Re: [PATCH 4.6 000/203] 4.6.5-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-07-26 04:50 +0200
Re: [PATCH 4.6 000/203] 4.6.5-stable review Guenter Roeck <linux@roeck-us.net> - 2016-07-26 16:00 +0200
Re: [PATCH 4.6 000/203] 4.6.5-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-07-26 16:30 +0200
Re: [PATCH 4.6 000/203] 4.6.5-stable review Guenter Roeck <linux@roeck-us.net> - 2016-07-26 17:50 +0200
Re: [PATCH 4.6 000/203] 4.6.5-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-07-27 06:50 +0200
csiph-web