From: Alexey Khoroshilov <khoroshilov@ispras.ru>
To: Tomas Henzl <thenzl@redhat.com>,
Sreekanth Reddy <sreekanth.reddy@avagotech.com>
Cc: MPT-FusionLinux.pdl@avagotech.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org, ldv-project@linuxtesting.org
Subject: Re: [PATCH v2] mptlan: add checks for dma mapping errors
Date: Mon, 25 Jan 2016 18:08:27 +0100 [thread overview]
Message-ID: <56A6568B.9020707@ispras.ru> (raw)
In-Reply-To: <56A640E4.2040509@redhat.com>
On 25.01.2016 16:36, Tomas Henzl wrote:
> On 23.1.2016 01:41, Alexey Khoroshilov wrote:
>> mpt_lan_sdu_send() and mpt_lan_post_receive_buckets() do not check
>> if mapping dma memory succeed.
>> The patch adds the checks and failure handling.
>>
>> Found by Linux Driver Verification project (linuxtesting.org).
>>
>> Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
>> ---
>> drivers/message/fusion/mptlan.c | 14 ++++++++++++++
>> 1 file changed, 14 insertions(+)
>>
>> diff --git a/drivers/message/fusion/mptlan.c b/drivers/message/fusion/mptlan.c
>> index cbe96072a6cc..3b6c8a755713 100644
>> --- a/drivers/message/fusion/mptlan.c
>> +++ b/drivers/message/fusion/mptlan.c
>> @@ -734,6 +734,12 @@ mpt_lan_sdu_send (struct sk_buff *skb, struct net_device *dev)
>>
>> dma = pci_map_single(mpt_dev->pcidev, skb->data, skb->len,
>> PCI_DMA_TODEVICE);
>> + if (pci_dma_mapping_error(mpt_dev->pcidev, dma)) {
>> + netif_stop_queue(dev);
>
> Hi Alexey,
> isn't a mpt_put_msg_frame needed here ?
> and a similar de-alloc in next chunk too?
> -tms
Hi Tomas,
You are right, thank you!
I'll resend the patch.
WARNING: multiple messages have this Message-ID (diff)
From: Alexey Khoroshilov <khoroshilov@ispras.ru>
To: Tomas Henzl <thenzl@redhat.com>,
Sreekanth Reddy <sreekanth.reddy@avagotech.com>
Cc: MPT-FusionLinux.pdl@avagotech.com, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org, ldv-project@linuxtesting.org
Subject: Re: [PATCH v2] mptlan: add checks for dma mapping errors
Date: Mon, 25 Jan 2016 18:08:27 +0100 [thread overview]
Message-ID: <56A6568B.9020707@ispras.ru> (raw)
In-Reply-To: <56A640E4.2040509@redhat.com>
On 25.01.2016 16:36, Tomas Henzl wrote:
> On 23.1.2016 01:41, Alexey Khoroshilov wrote:
>> mpt_lan_sdu_send() and mpt_lan_post_receive_buckets() do not check
>> if mapping dma memory succeed.
>> The patch adds the checks and failure handling.
>>
>> Found by Linux Driver Verification project (linuxtesting.org).
>>
>> Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
>> ---
>> drivers/message/fusion/mptlan.c | 14 ++++++++++++++
>> 1 file changed, 14 insertions(+)
>>
>> diff --git a/drivers/message/fusion/mptlan.c b/drivers/message/fusion/mptlan.c
>> index cbe96072a6cc..3b6c8a755713 100644
>> --- a/drivers/message/fusion/mptlan.c
>> +++ b/drivers/message/fusion/mptlan.c
>> @@ -734,6 +734,12 @@ mpt_lan_sdu_send (struct sk_buff *skb, struct net_device *dev)
>>
>> dma = pci_map_single(mpt_dev->pcidev, skb->data, skb->len,
>> PCI_DMA_TODEVICE);
>> + if (pci_dma_mapping_error(mpt_dev->pcidev, dma)) {
>> + netif_stop_queue(dev);
>
> Hi Alexey,
> isn't a mpt_put_msg_frame needed here ?
> and a similar de-alloc in next chunk too?
> -tms
Hi Tomas,
You are right, thank you!
I'll resend the patch.
--
Alexey
next prev parent reply other threads:[~2016-01-25 17:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-23 0:41 [PATCH v2] mptlan: add checks for dma mapping errors Alexey Khoroshilov
2016-01-25 15:36 ` Tomas Henzl
2016-01-25 17:08 ` Alexey Khoroshilov [this message]
2016-01-25 17:08 ` Alexey Khoroshilov
2016-01-25 18:02 ` [PATCH v3] " Alexey Khoroshilov
2016-01-26 16:33 ` Tomas Henzl
2016-01-27 2:22 ` Martin K. Petersen
2016-01-27 5:44 ` Sathya Prakash
2016-01-27 16:14 ` Tomas Henzl
2016-01-27 16:23 ` James Bottomley
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=56A6568B.9020707@ispras.ru \
--to=khoroshilov@ispras.ru \
--cc=MPT-FusionLinux.pdl@avagotech.com \
--cc=ldv-project@linuxtesting.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=sreekanth.reddy@avagotech.com \
--cc=thenzl@redhat.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.