Subject: Re: [PATCH v2 1/9] atm: propagate signal changes via notifier

From: Karl Hiramoto <[email-masked]>
Date: Wed, 07 Jul 2010 09:40:37 +0200

On 07/06/2010 09:41 PM, chas williams - CONTRACTOR wrote:
> On Mon,  5 Jul 2010 10:45:53 +0200
> Karl Hiramoto<[email-masked]>  wrote:
>
>> +void atm_dev_signal_change(struct atm_dev *dev, char signal)
>> +{
>> +	int i;
>> +	pr_debug("%s signal=%d dev=%p number=%d dev->signal=%d\n",
>> +		__func__, signal, dev, dev->number, dev->signal);
>> +
>> +	/* atm driver sending invalid signal */
>> +	WARN_ON(signal<  ATM_PHY_SIG_LOST || signal>
>> ATM_PHY_SIG_FOUND); +
>> +	if (dev->signal == signal)
>> +		return; /* no change */
>> +
>> +	dev->signal = signal;
>> +
>> +	&atm_dev_notify_chain, signal,
>> dev); +}
> i am not sure that you can use blocking_notifier_call_chain() here.
> atm_dev_signal_change() might be called from an interrupt context in
> some of the drivers.
>
> this implies that the notifier functions themselves must also not block.
> so in br2684 you probably want to use read_lock_irq() instead of just
> read_lock()

Chas,
I'll change to an atomic notifier, fix these issues, your other comments and send a new version of the patchset.

Thanks.

--
Karl