Re: [PATCH] 2.5.27 fix potential spinlocking race.

From: Trond Myklebust (trond.myklebust@fys.uio.no)
Date: Wed Jul 24 2002 - 08:05:59 EST


>>>>> " " == Linus Torvalds <torvalds@transmeta.com> writes:

> Trond noticed that kfree_skb() can be called from a _non_ bh
> context, ie process context. So it needs to protect itself
> against other bh's on this CPU (which it wouldn't need to do if
> it was only called from a bh context).

> So it's exactly your "better context" that is at stake here.

Precisely. Not coming from a computer science background, the jargon
sometimes gets the better of me ;-)

I was playing around with ip_build_xmit_slow() looking at alternatives
for fixing the MSG_DONTWAIT fragmentation bug mentioned on this list a
couple of weeks ago, when I noticed that it can call kfree_skb() from
a process context. This again means that write_space() can get called
without being wrapped in a local_bh_disable()/local_bh_enable() -
style protection against softirqs.

Cheers,
  Trond
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jul 30 2002 - 14:00:15 EST