Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1310426

Re: [Xen-devel] [PATCH] xen/gntdev: Don't allocate struct gntdev_copy_batch on stack

From Boris Ostrovsky <boris.ostrovsky@oracle.com>
Newsgroups linux.kernel
Subject Re: [Xen-devel] [PATCH] xen/gntdev: Don't allocate struct gntdev_copy_batch on stack
Date 2016-01-15 21:00 +0100
Message-ID <qRiHo-2fB-13@gated-at.bofh.it> (permalink)
References <qRixI-2cl-21@gated-at.bofh.it> <qRiHo-2fB-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 01/15/2016 02:50 PM, Andrew Cooper wrote:
> On 15/01/16 19:43, Boris Ostrovsky wrote:
>> @@ -933,18 +937,20 @@ static long gntdev_ioctl_grant_copy(struct gntdev_priv *priv, void __user *u)
>>   			goto out;
>>   		}
>>   
>> -		ret = gntdev_grant_copy_seg(&batch, &seg, &copy.segments[i].status);
>> +		ret = gntdev_grant_copy_seg(batch, &seg,
>> +			&copy.segments[i].status);
>>   		if (ret < 0)
>>   			goto out;
>>   
>>   		cond_resched();
>>   	}
>> -	if (batch.nr_ops)
>> -		ret = gntdev_copy(&batch);
>> +	if (batch->nr_ops)
>> +		ret = gntdev_copy(batch);
> You presumably want a kfree() here?

Ah, missed it. Thanks.

>
>>   	return ret;
>>   

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] xen/gntdev: Don't allocate struct gntdev_copy_batch on stack Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2016-01-15 20:50 +0100
  Re: [Xen-devel] [PATCH] xen/gntdev: Don't allocate struct  gntdev_copy_batch on stack Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2016-01-15 21:00 +0100
  Re: [Xen-devel] [PATCH] xen/gntdev: Don't allocate struct  gntdev_copy_batch on stack Andrew Cooper <andrew.cooper3@citrix.com> - 2016-01-15 21:00 +0100
  Re: [Xen-devel] [PATCH] xen/gntdev: Don't allocate struct gntdev_copy_batch  on stack David Vrabel <david.vrabel@citrix.com> - 2016-01-18 12:20 +0100
    Re: [Xen-devel] [PATCH] xen/gntdev: Don't allocate struct  gntdev_copy_batch on stack David Vrabel <david.vrabel@citrix.com> - 2016-01-19 15:40 +0100
    Re: [Xen-devel] [PATCH] xen/gntdev: Don't allocate struct  gntdev_copy_batch on stack Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2016-01-19 15:40 +0100

csiph-web