/* Push stuff to user space */ 
static int orinoco_ioctl_getspy(struct net_device *dev, struct iw_point *srq){	struct orinoco_private *priv = netdev_priv(dev);	struct sockaddr address[IW_MAX_SPY];	struct iw_quality spy_stat[IW_MAX_SPY];	int number;	int i;	unsigned long flags;	if (orinoco_lock(priv, &flags) != 0)		return -EBUSY;	number = priv->spy_number;	if ((number > 0) && (srq->pointer)) {		/* Create address struct */		for (i = 0; i < number; i++) {			memcpy(address[i].sa_data, priv->spy_address[i],			       ETH_ALEN);			address[i].sa_family = AF_UNIX;		}		/* Copy stats */		/* In theory, we should disable irqs while copying the stats		 * because the rx path might update it in the middle...		 * Bah, who care ? - Jean II */		memcpy(&spy_stat, priv->spy_stat,		       sizeof(struct iw_quality) * IW_MAX_SPY);		for (i=0; i < number; i++)			priv->spy_stat[i].updated = 0;	}	orinoco_unlock(priv, &flags);	/* Push stuff to user space */	srq->length = number;	if(copy_to_user(srq->pointer, address,			 sizeof(struct sockaddr) * number))		return -EFAULT;	if(copy_to_user(srq->pointer + (sizeof(struct sockaddr)*number),			&spy_stat, sizeof(struct iw_quality) * number))		return -EFAULT;	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/620554e406e3cc01434c658a1e597162d7e56fd6/orinoco.c/buggy/drivers/net/wireless/orinoco.c