[PATCH v4 03/10] uaccess: Use masked_user_{read/write}_access_begin when required

Christophe Leroy (CS GROUP) chleroy at kernel.org
Mon Nov 17 18:11:11 AEDT 2025



Le 15/11/2025 à 16:53, Thomas Gleixner a écrit :
> On Thu, Nov 06 2025 at 12:31, Christophe Leroy wrote:
>> diff --git a/net/core/scm.c b/net/core/scm.c
>> index 66eaee783e8be..4a65f9baa87e7 100644
>> --- a/net/core/scm.c
>> +++ b/net/core/scm.c
>> @@ -274,7 +274,7 @@ int put_cmsg(struct msghdr * msg, int level, int type, int len, void *data)
>>   		check_object_size(data, cmlen - sizeof(*cm), true);
>>   
>>   		if (can_do_masked_user_access())
>> -			cm = masked_user_access_begin(cm);
>> +			cm = masked_user_write_access_begin(cm);
>>   		else if (!user_write_access_begin(cm, cmlen))
>>   			goto efault;
> 
> Shouldn't this be converted to scoped_....() ?

Sure. I made the same comment to you when reviewing your series, see [1]

[1] 
https://lore.kernel.org/all/e0795f90-1030-4954-aefc-be137e9db49e@csgroup.eu/

Do you prefer me to do it as part of my series ?

Christophe


More information about the Linuxppc-dev mailing list