lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LNX.2.00.1309301634260.28935@pobox.suse.cz>
Date:	Mon, 30 Sep 2013 16:35:47 +0200 (CEST)
From:	Jiri Kosina <jkosina@...e.cz>
To:	Dan Carpenter <dan.carpenter@...cle.com>,
	Joseph Salisbury <joseph.salisbury@...onical.com>
Cc:	list@...osl.org, Haiyang Zhang <haiyangz@...rosoft.com>,
	LKML <linux-kernel@...r.kernel.org>, open@...osl.org,
	HID CORE LAYER <linux-input@...r.kernel.org>,
	devel@...uxdriverproject.org, thomas@...3r.de
Subject: Re: [v3.11][Regression] HID: hyperv: convert alloc+memcpy to
 memdup

On Fri, 27 Sep 2013, Dan Carpenter wrote:

> It looks like magicmouse_raw_event() returns 1 on success and 0 on
> failure.

Good catch indeed.

I am not completely sure whether we are going to fix an oops or not by 
this, as I haven't seen the actual oops anywhere in this thread :) But 
definitely this looks like a good fix.

Joseph, could you please test with that? Thanks.



diff --git a/drivers/hid/hid-magicmouse.c b/drivers/hid/hid-magicmouse.c
index 3b43d1c..c211eb9 100644
--- a/drivers/hid/hid-magicmouse.c
+++ b/drivers/hid/hid-magicmouse.c
@@ -334,7 +334,7 @@ static int magicmouse_raw_event(struct hid_device *hdev,
 			size - 2 - data[1]);
 		break;
 	default:
-		return 0;
+		return 1;
 	}
 
 	if (input->id.product == USB_DEVICE_ID_APPLE_MAGICMOUSE) {
@@ -347,7 +347,7 @@ static int magicmouse_raw_event(struct hid_device *hdev,
 	}
 
 	input_sync(input);
-	return 1;
+	return 0;
 }
 
 static int magicmouse_setup_input(struct input_dev *input, struct hid_device *hdev)

-- 
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ