提交 68762148 编写于 作者: P Pietro Borrello 提交者: David S. Miller

rds: rds_rm_zerocopy_callback() correct order for list_add_tail()

rds_rm_zerocopy_callback() uses list_add_tail() with swapped
arguments. This links the list head with the new entry, losing
the references to the remaining part of the list.

Fixes: 9426bbc6 ("rds: use list structure to track information for zerocopy completion notification")
Suggested-by: NPaolo Abeni <pabeni@redhat.com>
Signed-off-by: NPietro Borrello <borrello@diag.uniroma1.it>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 75da437a
......@@ -118,7 +118,7 @@ static void rds_rm_zerocopy_callback(struct rds_sock *rs,
ck = &info->zcookies;
memset(ck, 0, sizeof(*ck));
WARN_ON(!rds_zcookie_add(info, cookie));
list_add_tail(&q->zcookie_head, &info->rs_zcookie_next);
list_add_tail(&info->rs_zcookie_next, &q->zcookie_head);
spin_unlock_irqrestore(&q->lock, flags);
/* caller invokes rds_wake_sk_sleep() */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册