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


Groups > linux.kernel > #1466894

Re: [PATCH] wan-cosa: Use memdup_user() rather than duplicating its implementation

From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: [PATCH] wan-cosa: Use memdup_user() rather than duplicating its implementation
Date 2016-08-21 04:20 +0200
Message-ID <s8qwF-2Ob-3@gated-at.bofh.it> (permalink)
References <s89YR-Aq-5@gated-at.bofh.it> <s8a8x-F2-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Date: Sat, 20 Aug 2016 10:42:54 +0200

> Le 20/08/2016 à 10:25, SF Markus Elfring a écrit :
>> @@ -875,16 +875,10 @@ static ssize_t cosa_write(struct file *file,
>>   	if (count > COSA_MTU)
>>   		count = COSA_MTU;
>>   	
>> -	/* Allocate the buffer */
>> -	kbuf = kmalloc(count, GFP_KERNEL|GFP_DMA);
> In this case, 'memdup_user()' has a different meaning, as GFP_DMA will
> no more be used for this memory allocation.

Agreed, this transformation is not equivalent.

Markus, please do not make these changes so blindly.

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


Thread

[PATCH] wan-cosa: Use memdup_user() rather than duplicating its  implementation SF Markus Elfring <elfring@users.sourceforge.net> - 2016-08-20 10:40 +0200
  Re: [PATCH] wan-cosa: Use memdup_user() rather than duplicating its  implementation Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2016-08-20 10:50 +0200
    Re: [PATCH] wan-cosa: Use memdup_user() rather than duplicating  its implementation David Miller <davem@davemloft.net> - 2016-08-21 04:20 +0200
  Re: [PATCH] wan-cosa: Use memdup_user() rather than duplicating its  implementation Jan Kasprzak <kas@fi.muni.cz> - 2016-08-24 17:40 +0200
    Re: wan-cosa: Use memdup_user() rather than duplicating its  implementation SF Markus Elfring <elfring@users.sourceforge.net> - 2016-08-24 18:20 +0200
      Re: wan-cosa: Use memdup_user() rather than duplicating its  implementation Jan Kasprzak <kas@fi.muni.cz> - 2016-08-25 11:20 +0200

csiph-web