lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87lhhlbtlz.fsf@vitty.brq.redhat.com>
Date:	Tue, 21 Apr 2015 13:36:56 +0200
From:	Vitaly Kuznetsov <vkuznets@...hat.com>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	"K. Y. Srinivasan" <kys@...rosoft.com>,
	devel@...uxdriverproject.org,
	Haiyang Zhang <haiyangz@...rosoft.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] Drivers: hv: vmbus: do cleanup on all vmbus_open() failure paths

Dan Carpenter <dan.carpenter@...cle.com> writes:

> On Tue, Apr 21, 2015 at 10:17:52AM +0200, Vitaly Kuznetsov wrote:
>> diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
>> index 54da66d..836386f 100644
>> --- a/drivers/hv/channel.c
>> +++ b/drivers/hv/channel.c
>> @@ -186,11 +186,12 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size,
>>  	list_del(&open_info->msglistentry);
>>  	spin_unlock_irqrestore(&vmbus_connection.channelmsg_lock, flags);
>>  
>> -	if (err == 0)
>> -		newchannel->state = CHANNEL_OPENED_STATE;
>> +	if (err != 0)
>
> Doesn't the double negative not make it slightly more confusing?
>

Point taken, will fix in v2 :-)

> regards,
> dan carpenter

-- 
  Vitaly
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ