diff options
author | David S. Miller <davem@davemloft.net> | 2018-11-09 21:18:48 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-09 21:19:44 -0800 |
commit | 12ceaf8864c269467846379ebea56a2b996f9e3b (patch) | |
tree | 39e5efd2c11583803652ce98424d976a99adec05 | |
parent | 457937bd2e8e70d3a37eee3eaa45d86d169a6762 (diff) | |
download | linux-stable-12ceaf8864c269467846379ebea56a2b996f9e3b.tar.gz linux-stable-12ceaf8864c269467846379ebea56a2b996f9e3b.tar.bz2 linux-stable-12ceaf8864c269467846379ebea56a2b996f9e3b.zip |
infiniband: nes: Fix more direct skb list accesses.
The following:
skb = skb->next;
...
if (skb == (struct sk_buff *)queue)
is transformed into:
skb = skb_peek_next(skb, queue);
...
if (!skb)
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/infiniband/hw/nes/nes_mgt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/nes/nes_mgt.c b/drivers/infiniband/hw/nes/nes_mgt.c index e96ffff61c3a..fc0c191014e9 100644 --- a/drivers/infiniband/hw/nes/nes_mgt.c +++ b/drivers/infiniband/hw/nes/nes_mgt.c @@ -223,11 +223,11 @@ static struct sk_buff *nes_get_next_skb(struct nes_device *nesdev, struct nes_qp } old_skb = skb; - skb = skb->next; + skb = skb_peek_next(skb, &nesqp->pau_list); skb_unlink(old_skb, &nesqp->pau_list); nes_mgt_free_skb(nesdev, old_skb, PCI_DMA_TODEVICE); nes_rem_ref_cm_node(nesqp->cm_node); - if (skb == (struct sk_buff *)&nesqp->pau_list) + if (!skb) goto out; } return skb; |