Re: [ofa-general] NetEffect, iw_nes and kernel warning

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Roland Dreier
Date: Wednesday, January 28, 2009 - 2:52 pm

> > OK, thanks... what confused me is that several other drivers also do
 > > skb_linearize() in their hard_start_xmit method... eg bnx2x,
 > > via-velocity, mv643xx_eth.  So there are several other lurking bugs to
 > > deal with here I guess.

 > They all look like lurking (and untested) bug paths. mv643xx is especially
 > bad since it can leak skb. But it should be possible to call pull_tail
 > if bh is disabled (as long as irqs are enabled).

Yes.  The only obvious problem with __pskb_pull_tail() with BHs disabled
is that with CONFIG_HIGHMEM set, it goes into kmap_skb_frag(), which
then unconditionally does local_bh_disable()/local_bh_enable().  There's
no reason in principle that kmap_skb_frag() couldn't do
local_save_flags()/local_restore_flags() instead.

Just grepping around I see other potential issues related to this, for
example the (unused but exported) function fcoe_fc_crc() does
kmap_atomic(KM_SKB_DATA_SOFTIRQ) without any particular BH disabling,
which might run into trouble if used in the wrong context...

 - R.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [ofa-general] NetEffect, iw_nes and kernel warning, Roland Dreier, (Tue Jan 27, 4:53 pm)
Re: [ofa-general] NetEffect, iw_nes and kernel warning, David Miller, (Tue Jan 27, 5:07 pm)
Re: [ofa-general] NetEffect, iw_nes and kernel warning, Stephen Hemminger, (Tue Jan 27, 5:17 pm)
RE: [ofa-general] NetEffect, iw_nes and kernel warning, Tung, Chien Tin, (Wed Jan 28, 9:36 am)
Re: [ofa-general] NetEffect, iw_nes and kernel warning, Roland Dreier, (Wed Jan 28, 11:05 am)
Re: [ofa-general] NetEffect, iw_nes and kernel warning, Stephen Hemminger, (Wed Jan 28, 12:05 pm)
Re: [ofa-general] NetEffect, iw_nes and kernel warning, Roland Dreier, (Wed Jan 28, 2:52 pm)
Re: [ofa-general] NetEffect, iw_nes and kernel warning, Herbert Xu, (Thu Jan 29, 11:57 pm)
Re: [ofa-general] NetEffect, iw_nes and kernel warning, Eilon Greenstein, (Fri Jan 30, 1:22 am)
Re: [ofa-general] NetEffect, iw_nes and kernel warning, Stephen Hemminger, (Fri Jan 30, 9:25 am)
Re: [ofa-general] NetEffect, iw_nes and kernel warning, Roland Dreier, (Fri Jan 30, 10:35 am)
Re: [ofa-general] NetEffect, iw_nes and kernel warning, David Miller, (Fri Jan 30, 2:51 pm)
Re: [ofa-general] NetEffect, iw_nes and kernel warning, Roland Dreier, (Fri Jan 30, 8:54 pm)
Re: [ofa-general] NetEffect, iw_nes and kernel warning, Lennert Buytenhek, (Tue Apr 21, 2:09 am)