public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Kulikov Vasiliy <segooon@gmail.com>
Cc: kernel-janitors@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@suse.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Greg Ungerer <gerg@uclinux.org>,
	Christoph Egger <siccegge@cs.fau.de>, Tejun Heo <tj@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/7] 68328serial: check return value of copy_*_user() instead of access_ok()
Date: Sat, 31 Jul 2010 21:09:08 +0200	[thread overview]
Message-ID: <20100731190907.GE26313@bicker> (raw)
In-Reply-To: <1280597881-8365-1-git-send-email-segooon@gmail.com>

On Sat, Jul 31, 2010 at 09:38:00PM +0400, Kulikov Vasiliy wrote:
> -						sizeof(struct m68k_serial)))
> -				return -EFAULT;
> -			copy_to_user((struct m68k_serial *) arg,
> +			return copy_to_user((struct m68k_serial *) arg,
>  				    info, sizeof(struct m68k_serial));

We should return if -EFAULT copy_to_user() failes here.

> -			return 0;
> -			
>  		default:
>  			return -ENOIOCTLCMD;
>  		}

Smatch would have caught that but I don't have a cross compile
environment set up.

regards,
dan carpenter

  reply	other threads:[~2010-07-31 19:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-31 17:38 [PATCH 1/7] 68328serial: check return value of copy_*_user() instead of access_ok() Kulikov Vasiliy
2010-07-31 19:09 ` Dan Carpenter [this message]
2010-08-01  6:14   ` Vasiliy Kulikov

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=20100731190907.GE26313@bicker \
    --to=error27@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=gerg@uclinux.org \
    --cc=gregkh@suse.de \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=segooon@gmail.com \
    --cc=siccegge@cs.fau.de \
    --cc=tj@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