From: David Miller <davem@davemloft.net>
To: khoroshilov@ispras.ru
Cc: kevin.curtis@farsite.co.uk, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, ldv-project@linuxtesting.org
Subject: Re: [PATCH] farsync: fix invalid memory accesses in fst_add_one() and fst_init_card()
Date: Tue, 08 Jul 2014 16:20:27 -0700 (PDT) [thread overview]
Message-ID: <20140708.162027.1804045121900039101.davem@davemloft.net> (raw)
In-Reply-To: <53BC7360.6050000@ispras.ru>
From: Alexey Khoroshilov <khoroshilov@ispras.ru>
Date: Tue, 08 Jul 2014 18:40:32 -0400
> On 08.07.2014 18:20, David Miller wrote:
>> From: Alexey Khoroshilov <khoroshilov@ispras.ru>
>> Date: Sat, 5 Jul 2014 03:35:50 +0400
>>
>>> - }
>>> + card->nports = i;
>>> + return (card->nports == 0) ? err : 0;
>>> + }
>> I don't think this is the right thing to do.
>>
>> This will cause the caller to not free the IRQ or any of the
>> other resources.
> My understanding of the existing code is to proceed if at least one port
> is available.
> So I return error code if no ports available at all, otherwise
> initialization continues and can succeed.
> If something else goes wrong, all resources are deallocated.
>
> Do you suggest to return error code unconditionally?
Yes, that is my suggestion.
I'm also weary of so many changes to a driver that gets so little
usage and probably next to no testing at all.
next prev parent reply other threads:[~2014-07-08 23:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-04 23:35 [PATCH] farsync: fix invalid memory accesses in fst_add_one() and fst_init_card() Alexey Khoroshilov
2014-07-08 22:20 ` David Miller
2014-07-08 22:40 ` Alexey Khoroshilov
2014-07-08 23:20 ` David Miller [this message]
2014-07-10 22:43 ` [PATCH v2] " Alexey Khoroshilov
2014-07-11 20:38 ` David Miller
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=20140708.162027.1804045121900039101.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=kevin.curtis@farsite.co.uk \
--cc=khoroshilov@ispras.ru \
--cc=ldv-project@linuxtesting.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).