[ovs-dev] [optimize 13/26] netlink-socket: Make caller provide message receive buffers.
Ethan Jackson
ethan at nicira.com
Wed Apr 18 11:02:00 PDT 2012
That makes sense. Looks good.
Ethan
On Wed, Apr 18, 2012 at 10:47, Ben Pfaff <blp at nicira.com> wrote:
> On Tue, Apr 17, 2012 at 07:03:49PM -0700, Ethan Jackson wrote:
>> I may be misreading the code, but nl_sock_transact_multiple__() seems
>> incorrect to me. It seems possible to me that we would swap tmp_reply
>> for one of the replies in 'transactions'. Since tmp_reply is
>> (potentially) stack allocated, this could cause problems.
>
> tmp_txn is only used if no remaining transactions have buffers.
> Therefore, the "if (txn->reply...)" that does the swap will never happen
> if tmp_txn is in use. So I don't see how that can happen.
>
>> In a couple of places in netlink-socket %d is used instead of %zu for
>> a sizeof in a format string.
>
> Thanks, fixed up.
More information about the dev
mailing list