From: Maninder Singh <maninder1.s@samsung.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: "forest@alittletooquiet.net" <forest@alittletooquiet.net>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
"gclement@baobob.org" <gclement@baobob.org>,
"tvboxspy@gmail.com" <tvboxspy@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"joe@perches.com" <joe@perches.com>,
PANKAJ MISHRA <pankaj.m@samsung.com>
Subject: Re: [RESEND PATCH 1/1] staging:vt6655: remove checks around dev_kfree_skb
Date: Thu, 16 Jul 2015 08:45:09 +0000 (GMT) [thread overview]
Message-ID: <686357594.854551437036306449.JavaMail.weblogic@ep2mlwas07d> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=windows-1252, Size: 1594 bytes --]
Hi Dan,
>I hate these patches. I have told Markus to stop sending them but he
>has issues so now I only complain when they introduce a bug. There was
>one bug I have missed because it was a benchmark regression and I knew
>it was theoretically possible but I didn't know the code well enough to
>say which were fast paths...
>My main objection is that relying on the sanity check inside the
>function call makes the code more subtle to understand. We know we need
>a NULL check but it is hidden away in another file. The motivation for
>this patch you are sending is "There is a sanity check in dev_kfree_skb()
>so let's do an insane thing and save some lines of code."
>For this particular patch we assume throughout the whole driver that
>"pTDInfo->skb" can be NULL so making it inconsistent in this one place
>is wrong
Agreed,
But these changes are suggested because:-
where we are checking for (pTDInfo->skb), we are using it in above line.
and it does not look good, thats why we should remove thse checks and i have suggested
changes.
code snippet:-
-----------------------
if (pTDInfo->skb_dma && (pTDInfo->skb_dma != pTDInfo->buf_dma))
dma_unmap_single(&pDevice->pcid->dev, pTDInfo->skb_dma,
pTDInfo->skb->len, DMA_TO_DEVICE);
----> In this we did not check for pTDInfo->skb
if (pTDInfo->skb)
dev_kfree_skb(pTDInfo->skb);
But if am wrong, sorry for the patch.
Thanks,
Maninder
............ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
next reply other threads:[~2015-07-16 8:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-16 8:45 Maninder Singh [this message]
2015-07-16 8:54 ` [RESEND PATCH 1/1] staging:vt6655: remove checks around dev_kfree_skb Dan Carpenter
2015-07-16 10:08 ` Malcolm Priestley
-- strict thread matches above, loose matches on Subject: below --
2015-07-15 3:22 Maninder Singh
2015-07-16 7:54 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=686357594.854551437036306449.JavaMail.weblogic@ep2mlwas07d \
--to=maninder1.s@samsung.com \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=forest@alittletooquiet.net \
--cc=gclement@baobob.org \
--cc=gregkh@linuxfoundation.org \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pankaj.m@samsung.com \
--cc=tvboxspy@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.