[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20191216.164255.98881482203698707.davem@davemloft.net>
Date: Mon, 16 Dec 2019 16:42:55 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: pakki001@....edu
Cc: kjlu@....edu, r.baldyga@...sung.com, k.opasiak@...sung.com,
linux-nfc@...ts.01.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] nfc: s3fwrn5: replace the assertion with a WARN_ON
From: Aditya Pakki <pakki001@....edu>
Date: Sun, 15 Dec 2019 13:01:29 -0600
> @@ -507,7 +507,8 @@ int s3fwrn5_fw_recv_frame(struct nci_dev *ndev, struct sk_buff *skb)
> struct s3fwrn5_info *info = nci_get_drvdata(ndev);
> struct s3fwrn5_fw_info *fw_info = &info->fw_info;
>
> - BUG_ON(fw_info->rsp);
> + if (WARN_ON(fw_info->rsp))
> + return -EINVAL;
>
> fw_info->rsp = skb;
This leaks "skb" and you can even see that this might be the case
purely by looking at the context of the patch.
Powered by blists - more mailing lists