Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: IB/ehca: Reject dynamic memory add/remove when ehca adapter is present IB/ehca: Fix reported max number of QPs and CQs in systems with >1 adapter IPoIB: Set netdev offload features properly for child (VLAN) interfaces IPoIB: Clean up ethtool support mlx4_core: Add Ethernet PCI device IDs mlx4_en: Add driver for Mellanox ConnectX 10GbE NIC mlx4_core: Multiple port type support mlx4_core: Ethernet MAC/VLAN management mlx4_core: Get ethernet MTU and default address from firmware mlx4_core: Support multiple pre-reserved QP regions Update NetEffect maintainer emails to Intel emails RDMA/cxgb3: Remove cmid reference on tid allocation failures IB/mad: Use krealloc() to resize snoop table IPoIB: Always initialize poll_timer to avoid crash on unload IB/ehca: Don't allow creating UC QP with SRQ mlx4_core: Add QP range reservation support RDMA/ucma: Test ucma_alloc_multicast() return against NULL, not with IS_ERR()
This commit is contained in:
@ -406,19 +406,15 @@ static int register_snoop_agent(struct ib_mad_qp_info *qp_info,
|
||||
|
||||
if (i == qp_info->snoop_table_size) {
|
||||
/* Grow table. */
|
||||
new_snoop_table = kmalloc(sizeof mad_snoop_priv *
|
||||
qp_info->snoop_table_size + 1,
|
||||
GFP_ATOMIC);
|
||||
new_snoop_table = krealloc(qp_info->snoop_table,
|
||||
sizeof mad_snoop_priv *
|
||||
(qp_info->snoop_table_size + 1),
|
||||
GFP_ATOMIC);
|
||||
if (!new_snoop_table) {
|
||||
i = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
if (qp_info->snoop_table) {
|
||||
memcpy(new_snoop_table, qp_info->snoop_table,
|
||||
sizeof mad_snoop_priv *
|
||||
qp_info->snoop_table_size);
|
||||
kfree(qp_info->snoop_table);
|
||||
}
|
||||
|
||||
qp_info->snoop_table = new_snoop_table;
|
||||
qp_info->snoop_table_size++;
|
||||
}
|
||||
|
@ -904,8 +904,8 @@ static ssize_t ucma_join_multicast(struct ucma_file *file,
|
||||
|
||||
mutex_lock(&file->mut);
|
||||
mc = ucma_alloc_multicast(ctx);
|
||||
if (IS_ERR(mc)) {
|
||||
ret = PTR_ERR(mc);
|
||||
if (!mc) {
|
||||
ret = -ENOMEM;
|
||||
goto err1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user