if (count < sizeof (struct ib_user_mad)) 
if (count < sizeof (struct ib_user_mad) + sizeof (struct ib_mad)) 
static ssize_t ib_umad_read(struct file *filp, char __user *buf,			    size_t count, loff_t *pos){	struct ib_umad_file *file = filp->private_data;	struct ib_umad_packet *packet;	ssize_t ret;	if (count < sizeof (struct ib_user_mad))		return -EINVAL;	spin_lock_irq(&file->recv_lock);	while (list_empty(&file->recv_list)) {		spin_unlock_irq(&file->recv_lock);		if (filp->f_flags & O_NONBLOCK)			return -EAGAIN;		if (wait_event_interruptible(file->recv_wait,					     !list_empty(&file->recv_list)))			return -ERESTARTSYS;		spin_lock_irq(&file->recv_lock);	}	packet = list_entry(file->recv_list.next, struct ib_umad_packet, list);	list_del(&packet->list);	spin_unlock_irq(&file->recv_lock);	if (copy_to_user(buf, &packet->mad, sizeof packet->mad))		ret = -EFAULT;	else		ret = sizeof packet->mad;	kfree(packet);	return ret;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/cb183a06b381652b7637fedfa7ef85ec0baf2a1f/user_mad.c/clean/drivers/infiniband/core/user_mad.c