mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: Chris Wright <chrisw@osdl.org>
Cc: Andrew Morton <akpm@osdl.org>,
	arjanv@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: updated-fbmem-patch.patch
Date: Thu, 22 Apr 2004 00:57:44 +0200	[thread overview]
Message-ID: <20040421225744.GW29954@dualathlon.random> (raw)
In-Reply-To: <20040421154153.O22989@build.pdx.osdl.net>

On Wed, Apr 21, 2004 at 03:41:53PM -0700, Chris Wright wrote:
> * Andrea Arcangeli (andrea@suse.de) wrote:
> > http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.5/2.6.5-mm4/broken-out/updated-fbmem-patch.patch
> > 
> > this uses get_user for the set_cmap operation too.
> > 
> > --- 2.6.5-aa3/drivers/video/fbmem.c.~1~	2004-04-04 08:09:23.000000000 +0200
> > +++ 2.6.5-aa3/drivers/video/fbmem.c	2004-04-21 03:11:05.878951424 +0200
> > @@ -1034,11 +1034,11 @@ fb_ioctl(struct inode *inode, struct fil
> >  	case FBIOPUTCMAP:
> >  		if (copy_from_user(&cmap, (void *) arg, sizeof(cmap)))
> >  			return -EFAULT;
> > -		return (fb_set_cmap(&cmap, 0, info));
> > +		return (fb_set_cmap(&cmap, 1, info));
> 
> 0 is userspace, 1 is kernel space.  this change looks wrong.
> 
> Perhaps the change below so comment is in sync with code.

yes, I was mislead by the comment, that's why you will never ever see a
single comments describing parameters in my code (except if the stuff
really isn't obvious and it cannot be trivially deduced by the code and
in turn it _deserves_ a fat comment, definitely not in this case).
There's no way I can trust comments anyways, I perfectly know I cannot
stop after reading a comment, I went ahead and I checked if the comment
was right but it was too late and I was already biased by what I read in
the comment so I didn't notice the comment was wrong. This isn't a good
excuse, it's still my bad mistake, shame on me, but it certainly gives
more strenght to my no-comment-for-obvious-parameters policy. I don't
care if you cannot do a pdf of the whole kernel anymore, that pdf is
likely buggy anyways and you'd better not attempt to read it in the
first place.

Arjan and Andrew also notified me privately. thanks to all for noticing
and sorry for the stupid mistake of being influenced by a worthless
comment.

      reply	other threads:[~2004-04-21 22:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-21  2:10 updated-fbmem-patch.patch Andrea Arcangeli
2004-04-21 22:41 ` updated-fbmem-patch.patch Chris Wright
2004-04-21 22:57   ` Andrea Arcangeli [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=20040421225744.GW29954@dualathlon.random \
    --to=andrea@suse.de \
    --cc=akpm@osdl.org \
    --cc=arjanv@redhat.com \
    --cc=chrisw@osdl.org \
    --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®