diff mbox

fcoe: use kfree_skb() to free an skb

Message ID 20160804052756.GH775@mwanda (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Dan Carpenter Aug. 4, 2016, 5:27 a.m. UTC
This should be doing kfree_skb() instead of kfree().

Fixes: 9a6cf881df02 ('fcoe: implement FIP VLAN responder')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Johannes Thumshirn Aug. 4, 2016, 8:12 a.m. UTC | #1
On Thu, Aug 04, 2016 at 08:27:56AM +0300, Dan Carpenter wrote:
> This should be doing kfree_skb() instead of kfree().
> 
> Fixes: 9a6cf881df02 ('fcoe: implement FIP VLAN responder')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c
> index a569c65..dcf3653 100644
> --- a/drivers/scsi/fcoe/fcoe_ctlr.c
> +++ b/drivers/scsi/fcoe/fcoe_ctlr.c
> @@ -2923,7 +2923,7 @@ static int fcoe_ctlr_vlan_recv(struct fcoe_ctlr *fip, struct sk_buff *skb)
>  	mutex_unlock(&fip->ctlr_mutex);
>  
>  drop:
> -	kfree(skb);
> +	kfree_skb(skb);
>  	return rc;
>  }
>  
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Hi Dan,

This was already sent by Wei Yongjun and is
https://patchwork.kernel.org/patch/9245273/. Should be queued in Martin's tree
already.

Thanks,
	Johannes
diff mbox

Patch

diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c
index a569c65..dcf3653 100644
--- a/drivers/scsi/fcoe/fcoe_ctlr.c
+++ b/drivers/scsi/fcoe/fcoe_ctlr.c
@@ -2923,7 +2923,7 @@  static int fcoe_ctlr_vlan_recv(struct fcoe_ctlr *fip, struct sk_buff *skb)
 	mutex_unlock(&fip->ctlr_mutex);
 
 drop:
-	kfree(skb);
+	kfree_skb(skb);
 	return rc;
 }