Re: [patch 6/12] hold atomic kmaps across generic_file_read

Daniel Phillips
2002-08-12T21:16:43Z

On Monday 12 August 2002 22:29, Linus Torvalds wrote:
> On Mon, 12 Aug 2002, Daniel Phillips wrote:
> >
> > That's the whole point of this: it's not a bug anymore. (It's a feature.)
>
> Well, it's a feature only if _intentional_, so I think Rusty's argument
> was that we should call it something else than "copy_to/from_user()" if
> we're ready to accept the fact that it fails for random reasons..

Right, I meant to follow up and correct that - the caller has the
responsibility of detecting the short transfer and taking corrective
action, but on the other hand, maybe the caller always had that
responsibility.

But for the cases where the caller 'knows' it holds no locks, it's
better to oops if that's untrue as Rusty said, plus the inc/dec is
saved in that case.

--
Daniel