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: <497F3640.6070600@opengridcomputing.com>
Date:	Tue, 27 Jan 2009 10:28:48 -0600
From:	Steve Wise <swise@...ngridcomputing.com>
To:	Oliver Neukum <oliver@...kum.org>
CC:	Evgeniy Polyakov <zbr@...emap.net>, netdev@...r.kernel.org,
	rdreier@...co.com, rds-devel@....oracle.com,
	general@...ts.openfabrics.org
Subject: Re: [ofa-general] Re: [PATCH 06/21] RDS: Connection handling

Oliver Neukum wrote:
> Am Tuesday 27 January 2009 14:34:19 schrieb Evgeniy Polyakov:
>   
>> On Mon, Jan 26, 2009 at 06:17:43PM -0800, Andy Grover (andy.grover@...cle.com) wrote:
>>     
>>> +static inline int rds_conn_is_sending(struct rds_connection *conn)
>>> +{
>>> +	int ret = 0;
>>> +
>>> +	if (!mutex_trylock(&conn->c_send_lock))
>>> +		ret = 1;
>>> +	else
>>> +		mutex_unlock(&conn->c_send_lock);
>>> +
>>> +	return ret;
>>> +}
>>> +
>>>       
>> This one is eventually invoked under the spin_lock with turned off irqs,
>> which may freeze the machine:
>> rds_for_each_conn_info() -> spin_lock_irqsave(global lock) ->
>> rds_conn_info_visitor() -> rds_conn_info_set() -> rds_conn_is_sending()
>> -> boom.
>>     
>
> Why? This is _trylock. It won't block.
>
>   
mutex_trylock() uses spin_lock_mutex() which has this in the debug version:

DEBUG_LOCKS_WARN_ON(in_interrupt());

--
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