From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752622AbcEAXRr (ORCPT ); Sun, 1 May 2016 19:17:47 -0400 Received: from mga04.intel.com ([192.55.52.120]:16989 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752436AbcEAXRk (ORCPT ); Sun, 1 May 2016 19:17:40 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,564,1455004800"; d="scan'208";a="970444568" Date: Mon, 2 May 2016 01:17:36 +0200 From: Samuel Ortiz To: Michael Thalmeier Cc: Lauro Ramos Venancio , Aloisio Almeida Jr , linux-kernel@vger.kernel.org, linux-nfc@ml01.01.org, michael@thalmeier.at Subject: Re: [PATCH 09/11] NFC: pn533: use nfc_alloc_recv_skb for skb allocation Message-ID: <20160501231736.GC19653@zurbaran.home> References: <1461249839-16962-1-git-send-email-michael.thalmeier@hale.at> <1461249839-16962-10-git-send-email-michael.thalmeier@hale.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1461249839-16962-10-git-send-email-michael.thalmeier@hale.at> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Michael, On Thu, Apr 21, 2016 at 04:43:57PM +0200, Michael Thalmeier wrote: > When multiple receive frames need to be put together in pn533_build_response > we need to use nfc_alloc_recv_skb instead of the normal alloc_skb. Otherwise > the nfc core causes an skb error when it tries to push the status byte in > front of the data. > > Signed-off-by: Michael Thalmeier > --- > drivers/nfc/pn533/pn533.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/nfc/pn533/pn533.c b/drivers/nfc/pn533/pn533.c > index c06d22f..ae13277 100644 > --- a/drivers/nfc/pn533/pn533.c > +++ b/drivers/nfc/pn533/pn533.c > @@ -1942,7 +1942,7 @@ static struct sk_buff *pn533_build_response(struct pn533 *dev) > dev_dbg(dev->dev, "%s total length %d\n", > __func__, skb_len); > > - skb = alloc_skb(skb_len, GFP_KERNEL); > + skb = nfc_alloc_recv_skb(skb_len, GFP_KERNEL); That looks reasonable. What surprises me is that I'm pretty sure this got tested (MI bit set on the Rx path)... Do you get the error from rawsock_add_header() ? Cheers, Samuel.