netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Randy.Dunlap" <rddunlap@osdl.org>
To: netdev@oss.sgi.com, davem@redhat.com
Cc: maxk@qualcomm.com
Subject: [PATCH] janitor: bluetooth: remove unneeded verify_area call
Date: Thu, 25 Sep 2003 21:56:37 -0700	[thread overview]
Message-ID: <20030925215637.42631e42.rddunlap@osdl.org> (raw)


Hi,
Please apply to 2.6.0-test5-current.

Thanks,
--
~Randy


From: Domen Puncer <domen@coderock.org>

 linux-260-t5bk12-kj-rddunlap/net/bluetooth/hci_core.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff -puN net/bluetooth/hci_core.c~net_bluetooth_hcicore_verify net/bluetooth/hci_core.c
--- linux-260-t5bk12-kj/net/bluetooth/hci_core.c~net_bluetooth_hcicore_verify	2003-09-25 16:01:20.000000000 -0700
+++ linux-260-t5bk12-kj-rddunlap/net/bluetooth/hci_core.c	2003-09-25 16:01:20.000000000 -0700
@@ -434,11 +434,11 @@ int hci_inquiry(unsigned long arg)
 
 	BT_DBG("num_rsp %d", ir.num_rsp);
 
-	if (!verify_area(VERIFY_WRITE, ptr, sizeof(ir) + 
-			(sizeof(struct inquiry_info) * ir.num_rsp))) {
-		copy_to_user(ptr, &ir, sizeof(ir));
+	if (!copy_to_user(ptr, &ir, sizeof(ir))) {
 		ptr += sizeof(ir);
-	        copy_to_user(ptr, buf, sizeof(struct inquiry_info) * ir.num_rsp);
+	        if (copy_to_user(ptr, buf, sizeof(struct inquiry_info) *
+					ir.num_rsp))
+			err = -EFAULT;
 	} else 
 		err = -EFAULT;
 

_

             reply	other threads:[~2003-09-26  4:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-26  4:56 Randy.Dunlap [this message]
2003-09-26  6:02 ` [PATCH] janitor: bluetooth: remove unneeded verify_area call David S. Miller

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=20030925215637.42631e42.rddunlap@osdl.org \
    --to=rddunlap@osdl.org \
    --cc=davem@redhat.com \
    --cc=maxk@qualcomm.com \
    --cc=netdev@oss.sgi.com \
    /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;
as well as URLs for NNTP newsgroup(s).