RE: [GIT PULL] usercopy structs for v5.4-rc2

From: David Laight
Date: Mon Oct 07 2019 - 09:11:54 EST


From: Nathan Chancellor
> Sent: 04 October 2019 20:44
...
> > IOW, the code should have just been
> >
> > ret = test(umem_src == NULL, "kmalloc failed");
> > if (ret) ...
>
> Yes, I had this as the original fix but I tried to keep the same
> intention as the original author. I should have gone with my gut. Sorry
> for the ugliness, I'll try to be better in the future.

This rather begs the question about why 'usercopy' is ever calling kmalloc() at all.
Never mind some perverted style for reporting errors.

David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)