lkml.org 
[lkml]   [2019]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] nfc: s3fwrn5: replace the assertion with a WARN_ON
From
From: Aditya Pakki <pakki001@umn.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.

\
 
 \ /
  Last update: 2019-12-17 01:43    [W:0.031 / U:1.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site