[lkml]   [2019]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [GIT PULL] usercopy structs for v5.4-rc2
On Mon, Oct 07, 2019 at 01:11:46PM +0000, David Laight wrote:
> 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.

Do you even bother to read what you are commenting upon, or is it simply the
irresistable pleasure of being seen[*]?

When a function called 'test_copy_struct_from_user' starts with a couple of
allocations, one called 'umem_src' and another - 'expected', what could that
possibly be about? Something to do with testing copy_struct_from_user(),
perhaps? And, taking a wild guess, maybe allocating a buffer or two to
be somehow used in setting the test up?

Or you could just go and read the damn function, you twit.

[*] sensu Monty Python, if we are lucky enough

 \ /
  Last update: 2019-10-10 17:16    [W:0.065 / U:2.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site