Re: [PATCH] ide-tape: attempt to handle copy_*_user() failures [take two]

From: Jesper Juhl
Date: Sat Jan 28 2006 - 13:50:47 EST


On 1/23/06, Andrew Morton <akpm@xxxxxxxx> wrote:
> Jesper Juhl <jesper.juhl@xxxxxxxxx> wrote:
> >
> > Second attempt at this patch.
> >
> > (
> > noticed a small flaw in my first patch, this should be better.
> > also noticed that Gadi Oxman seems unable to recieve mail at the address
> > listed in MAINTAINERS, so put a few other (hopefully relevant) people on
> > Cc instead
> > )
> >
> >
> > Attempt to handle copy_*_user() failures in
> > drivers/ide/ide-tape.c::idetape_copy_stage_*_user
> >
> > drivers/ide/ide-tape.c:2663: warning: ignoring return value of opy_from_user', declared with attribute warn_unused_result
> > drivers/ide/ide-tape.c:2690: warning: ignoring return value of opy_to_user', declared with attribute warn_unused_result
> >
> > Due to lack of hardware I'm unfortunately not able to test this patch
> > beyond making sure it compiles.
> >
>
> Too scary for me.
>
Fair enough.

> > @@ -2669,26 +2671,30 @@ static void idetape_copy_stage_from_user
> > if (bh)
> > atomic_set(&bh->b_count, 0);
> > }
> > + if (not_copied)
> > + return not_copied;
> > }
> > tape->bh = bh;
> > + return 0;
> > }
>
> What are the effects of not updating tape->bh?
>
Ouch, I guess the effects would be the next access to the tape hitting
the same area as the last one - not good.
I don't know this code very intimately and this certainly looks like a
mistake on my part, so ignore the patch for now please.

I made the patch fully aware that I was not on very solid ground,
which is also why I didn't ask for "merge this please" and used the
"Attempt to handle .." language in the patch description - I was just
offering the patch for "here you are, see if it looks good" review.
The review turned up flaws, so for now the patch is dead (thank you
for looking at it though).

--
Jesper Juhl <jesper.juhl@xxxxxxxxx>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/