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] [thread-next>] [day] [month] [year] [list]
Message-ID: <54F127FF.1060207@windriver.com>
Date:	Sat, 28 Feb 2015 10:29:19 +0800
From:	Ying Xue <ying.xue@...driver.com>
To:	Jon Maloy <jon.maloy@...csson.com>,
	"viro@...IV.linux.org.uk" <viro@...IV.linux.org.uk>,
	"hch@....de" <hch@....de>,
	"davem@...emloft.net" <davem@...emloft.net>
CC:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	Erik Hugne <erik.hugne@...csson.com>
Subject: Re: [PATCH net-next 1/2] tipc: Don't use iocb argument in socket
 layer

On 02/27/2015 09:30 PM, Jon Maloy wrote:
>> > socket *sock, long *timeo_p)  static int tipc_sendmsg(struct kiocb *iocb,
>> > struct socket *sock,
>> >  			struct msghdr *m, size_t dsz)
>> >  {
>> > +	struct sock *sk = sock->sk;
>> > +	int ret;
> alternative method: 
> 
>                 bool has_lock = false;
>> > +
>> > +	lock_sock(sk);
> 
>              if (!owned_by_user(sk) {
>                             lock_sock(sk);
>                             has_lock = true;
>               }      
>> > +	ret = __tipc_sendmsg(sock, m, dsz);
>               [expand  code here, instead of an extra call]
> 
>               if (has_lock))
>                       release_sock();
> 
> Not sure what I prefer, but I just wanted to indicate
> this option.
> 

Thanks! In my opinion, the current version seems more clear. :)

> You can anyway add a "Reviewed-by" from me.

Regards,
Ying

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ