]> git.baikalelectronics.ru Git - kernel.git/commit
NFC: llcp: Fix Rx memory leak
authorSamuel Ortiz <sameo@linux.intel.com>
Fri, 7 Dec 2012 15:37:30 +0000 (16:37 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Wed, 9 Jan 2013 23:48:25 +0000 (00:48 +0100)
commitb04d8a4dc955b152ec8c3a1faad2b78fb4047cd1
tree481c0ec5c71347d2e4cded197d106e31b4b53c25
parent68a96b1383577611fea8df20cd46d0f568324733
NFC: llcp: Fix Rx memory leak

The reference count bump on the llcp Rx path is leading to a memory leak
whenever we're not receiving an I frame.
We fix that by removing the refcount bump (drivers must not free their
received skb) and using it only in the I frame path, when the frame is
actually queued. In that case, the skb will only be freed when someone
fetches it from userspace. in all other cases, LLCP received frames will
be freed when leaving the Rx work queue.

Reported-by: Eric Lapuyade <eric.lapuyade@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
net/nfc/llcp/llcp.c