netdev
[Top] [All Lists]

[SCTP] Replace spin_lock_irqsave with spin_lock_bh

To: "David S. Miller" <davem@xxxxxxxxxxxxx>, netdev@xxxxxxxxxxx
Subject: [SCTP] Replace spin_lock_irqsave with spin_lock_bh
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 2 Jun 2005 19:54:59 +1000
In-reply-to: <20050602094404.GA10316@gondor.apana.org.au>
References: <20050602094404.GA10316@gondor.apana.org.au>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.9i
Hi Dave:

This patch replaces the spin_lock_irqsave call on the receive queue
lock in SCTP with spin_lock_bh.  Despite the proliferation of
spin_lock_irqsave calls in this stack, it is only entered from the
IPv4/IPv6 stack and user space.  That is, it is never entered from
hardirq context.

The call in question is only called from recvmsg which means that
IRQs aren't disabled.  Therefore it is safe to replace it with
spin_lock_bh.
 
Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> 

As before, this should probably only go into net-2.6.13.
 
Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

Attachment: p
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>