int err, gfp_mask; 
int err; unsigned int gfp_mask; 
static int snd_seq_iwffff_copy_wave_from_stream(snd_iwffff_ops_t *ops,						iwffff_layer_t *lp,					        char __user **data,					        long *len,					        int atomic){	iwffff_wave_t *wp, *prev;	iwffff_xwave_t xp;	int err, gfp_mask;	unsigned int real_size;		gfp_mask = atomic ? GFP_ATOMIC : GFP_KERNEL;	if (*len < (long)sizeof(xp))		return -EINVAL;	if (copy_from_user(&xp, *data, sizeof(xp)))		return -EFAULT;	*data += sizeof(xp);	*len -= sizeof(xp);	wp = kcalloc(1, sizeof(*wp), gfp_mask);	if (wp == NULL)		return -ENOMEM;	wp->share_id[0] = le32_to_cpu(xp.share_id[0]);	wp->share_id[1] = le32_to_cpu(xp.share_id[1]);	wp->share_id[2] = le32_to_cpu(xp.share_id[2]);	wp->share_id[3] = le32_to_cpu(xp.share_id[3]);	wp->format = le32_to_cpu(xp.format);	wp->address.memory = le32_to_cpu(xp.offset);	wp->size = le32_to_cpu(xp.size);	wp->start = le32_to_cpu(xp.start);	wp->loop_start = le32_to_cpu(xp.loop_start);	wp->loop_end = le32_to_cpu(xp.loop_end);	wp->loop_repeat = le16_to_cpu(xp.loop_repeat);	wp->sample_ratio = le32_to_cpu(xp.sample_ratio);	wp->attenuation = xp.attenuation;	wp->low_note = xp.low_note;	wp->high_note = xp.high_note;	real_size = snd_seq_iwffff_size(wp->size, wp->format);	if (!(wp->format & IWFFFF_WAVE_ROM)) {		if ((long)real_size > *len) {			kfree(wp);			return -ENOMEM;		}	}	if (ops->put_sample) {		err = ops->put_sample(ops->private_data, wp,				      *data, real_size, atomic);		if (err < 0) {			kfree(wp);			return err;		}	}	if (!(wp->format & IWFFFF_WAVE_ROM)) {		*data += real_size;		*len -= real_size;	}	prev = lp->wave;	if (prev) {		while (prev->next) prev = prev->next;		prev->next = wp;	} else {		lp->wave = wp;	}	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/5a0f217d96656068f0f1e5cda16c35945f979b16/ainstr_iw.c/buggy/sound/core/seq/instr/ainstr_iw.c