[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20150228.165947.531668369319195087.davem@davemloft.net>
Date: Sat, 28 Feb 2015 16:59:47 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: jon.maloy@...csson.com
Cc: ying.xue@...driver.com, viro@...IV.linux.org.uk, hch@....de,
netdev@...r.kernel.org, erik.hugne@...csson.com
Subject: Re: [PATCH net-next 1/2] tipc: Don't use iocb argument in socket
layer
From: Jon Maloy <jon.maloy@...csson.com>
Date: Fri, 27 Feb 2015 13:30:40 +0000
>> struct socket *sock,
>> struct msghdr *m, size_t dsz)
>> {
>> + struct sock *sk = sock->sk;
>> + int ret;
>
> alternative method:
>
> bool has_lock = false;
>> +
Conditional locking inside of a function is always very
strongly discouraged.
Every function should have static, simple, consistent locking
requirements and side effects across calls.
--
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