mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Francois Romieu <romieu@fr.zoreil.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Arjan van de Ven <arjan@infradead.org>,
	alan@redhat.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: via-velocity.c fix sleep-with-spinlock bug during MTU change
Date: Tue, 3 Jun 2008 23:51:55 +0200	[thread overview]
Message-ID: <20080603215155.GA9712@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <20080603134019.df2f51d4.akpm@linux-foundation.org>

Andrew Morton <akpm@linux-foundation.org> :
[...]
> So hrm.  It could all be a lot better.  Just looking quickly at the
> code I _think_ we might be able to do all the needed allocations
> outside the lock and then swizzle them into place after taking the
> lock. ie, something as simple as:
[...]
> 	velocity_init_rd_ring(temp_vptr);	/* Can use GFP_KERNEL! */
> 
> 	spin_lock_irqsave(&vptr->lock, flags);
> 
> 	velocity_free_td_ring(vptr);
> 	velocity_free_rd_ring(vptr);
> 
> 	vptr->foo = temp_vptr->foo;
> 	vptr->bar = temp_vptr->bar;
> 	...
> 
> 	spin_unlock_irqrestore(&vptr->lock, flags);
> 
> ?

Almost.

I'll wrap it in the next 24 hours.

-- 
Ueimor

  reply	other threads:[~2008-06-03 22:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-01  1:46 Arjan van de Ven
2008-06-03 20:40 ` Andrew Morton
2008-06-03 21:51   ` Francois Romieu [this message]
2008-06-04 21:59     ` Francois Romieu
2008-06-14 21:23       ` Francois Romieu
2008-06-16 21:25         ` Séguier Régis
2008-06-17 21:45           ` Francois Romieu
2008-06-17 23:37             ` Séguier Régis
2008-06-18 16:56               ` Séguier Régis
2008-06-18 20:10                 ` Francois Romieu
2008-06-18 22:09                   ` Séguier Régis
2008-06-19 20:43                     ` Francois Romieu
2008-06-20 10:24                       ` Séguier Régis
2008-06-20 10:39                         ` Francois Romieu
2008-06-20 16:50                           ` Séguier Régis
2008-06-23 17:04                           ` Séguier Régis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080603215155.GA9712@electric-eye.fr.zoreil.com \
    --to=romieu@fr.zoreil.com \
    --cc=akpm@linux-foundation.org \
    --cc=alan@redhat.com \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®