mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jesper Juhl <jesper.juhl@gmail.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, axboe@suse.de
Subject: Re: [PATCH] ide-tape: attempt to handle copy_*_user() failures [take two]
Date: Sat, 28 Jan 2006 19:52:31 +0100	[thread overview]
Message-ID: <9a8748490601281052h56fe8dc9r511b450c46e353d1@mail.gmail.com> (raw)
In-Reply-To: <20060123000401.144e2ca2.akpm@osdl.org>

On 1/23/06, Andrew Morton <akpm@osdl.org> wrote:
> Jesper Juhl <jesper.juhl@gmail.com> 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 \x03opy_from_user', declared with attribute warn_unused_result
> > drivers/ide/ide-tape.c:2690: warning: ignoring return value of \x03opy_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@gmail.com>
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

      reply	other threads:[~2006-01-28 18:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-22 21:51 Jesper Juhl
2006-01-23  8:04 ` Andrew Morton
2006-01-28 18:52   ` Jesper Juhl [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9a8748490601281052h56fe8dc9r511b450c46e353d1@mail.gmail.com \
    --to=jesper.juhl@gmail.com \
    --cc=akpm@osdl.org \
    --cc=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®