RDMA/cxgb3: Don't reuse skbs that are non-linear or cloned
Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
parent
8cfccf02bb
commit
1f6a849b7c
|
@ -305,8 +305,7 @@ static int status2errno(int status)
|
||||||
*/
|
*/
|
||||||
static struct sk_buff *get_skb(struct sk_buff *skb, int len, gfp_t gfp)
|
static struct sk_buff *get_skb(struct sk_buff *skb, int len, gfp_t gfp)
|
||||||
{
|
{
|
||||||
if (skb) {
|
if (skb && !skb_is_nonlinear(skb) && !skb_cloned(skb)) {
|
||||||
BUG_ON(skb_cloned(skb));
|
|
||||||
skb_trim(skb, 0);
|
skb_trim(skb, 0);
|
||||||
skb_get(skb);
|
skb_get(skb);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue