Re: [PATCH] convert ircomm to seq_file interface
From: Jean Tourrilhes <hidden>
Date: 2003-08-18 20:09:23
On Mon, Aug 18, 2003 at 12:31:42PM -0700, Stephen Hemminger wrote:
Convert ircomm /proc interface to seq_file. Note: don't need spin_lock_irq because list is not ever locked from inside interrupt context.
I don't agree with this change. If you look in ircomm_lmp.c ; ircomm_lmp_flow_control(), you will see that the hashbin is accessed from BH context. So, at minimum it should be a spin_lock_bh(). Currently, all the IrDA stack uses spin_lock_irqsave(), where is fact a only spin_lock_bh() is needed. But, this is something that I kept for 2.7.X, because I would rather make sure previous locking changes are safe, before going to the next step. So, for consistency with the rest of the IrDA stack and the code in hashbin, I would keep the spin_lock_irqsave(). What do you think ? On the other hand, the conversion to seq_file is badly needed, because the current /proc code was known to be very buggy. Thanks for doing that. Have fun... Jean