Re: [PATCH] cli()/sti() fix for drivers/net/depca.c

Francois Romieu (romieu@cogenit.fr)
Thu, 3 Oct 2002 00:12:28 +0200


Denis Vlasenko <vda@port.imtp.ilyichevsk.odessa.ua> :
[...]
> Ho to do it properly? Make a copy on stack under lock, release lock,
> proceed with copy_to_user? That's 88 bytes at least...

Please see ETHTOOL_GSTATS usage in drivers/net/8139cp.c.

> > - on SMP, pktStat can be updated while the copy progresses, see depca_rx().
>
> Should I place these pktStat updates under lp->lock?

You may.

depca_rx() looks strange:
buf = skb_put(skb, len);
[...]
netif_rx(skb);
[...]
if (buf[0] & ...)

-- 
Ueimor
-
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/