[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230607112143.GE5025@thinkpad>
Date: Wed, 7 Jun 2023 16:51:43 +0530
From: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>
To: Simon Horman <simon.horman@...igine.com>
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, mhi@...ts.linux.dev,
linux-arm-msm@...r.kernel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, loic.poulain@...aro.org
Subject: Re: [PATCH 1/3] net: Add MHI Endpoint network driver
On Wed, Jun 07, 2023 at 10:20:39AM +0200, Simon Horman wrote:
> On Tue, Jun 06, 2023 at 06:01:17PM +0530, Manivannan Sadhasivam wrote:
>
> ...
>
> > +static void mhi_ep_net_dev_process_queue_packets(struct work_struct *work)
> > +{
> > + struct mhi_ep_net_dev *mhi_ep_netdev = container_of(work,
> > + struct mhi_ep_net_dev, xmit_work);
> > + struct mhi_ep_device *mdev = mhi_ep_netdev->mdev;
> > + struct sk_buff_head q;
> > + struct sk_buff *skb;
> > + int ret;
> > +
> > + if (mhi_ep_queue_is_empty(mdev, DMA_FROM_DEVICE)) {
> > + netif_stop_queue(mhi_ep_netdev->ndev);
> > + return;
> > + }
> > +
> > + __skb_queue_head_init(&q);
> > +
> > + spin_lock_bh(&mhi_ep_netdev->tx_lock);
> > + skb_queue_splice_init(&mhi_ep_netdev->tx_buffers, &q);
> > + spin_unlock_bh(&mhi_ep_netdev->tx_lock);
> > +
> > + while ((skb = __skb_dequeue(&q))) {
> > + ret = mhi_ep_queue_skb(mdev, skb);
> > + if (ret) {
>
> Hi Manivannan,
>
> I wonder if this should be kfree_skb(skb);
>
Good catch! Will fix it.
- Mani
> > + kfree(skb);
> > + goto exit_drop;
> > + }
>
> ...
--
மணிவண்ணன் சதாசிவம்
Powered by blists - more mailing lists