public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adam Kropelin <akropel1@rochester.rr.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, Vojtech Pavlik <vojtech@suse.cz>,
	Greg KH <greg@kroah.com>, Dmitry Torokhov <dtor@mail.ru>,
	'@mail.kroptech.com
Subject: Re: 2.6.12-mm2
Date: Sun, 26 Jun 2005 10:18:51 -0400	[thread overview]
Message-ID: <20050626101851.A18283@mail.kroptech.com> (raw)
In-Reply-To: <20050626040329.3849cf68.akpm@osdl.org>

I'd like to lobby for the merging into mainline of this patch from
git-input. It fixes a real bug, seen by real users, and has been
languishing in the input tree since March. It may also be a candidate
for the stable tree given it's one-linedness.

--

Fix extraction of HID items >= 32 bits

HID items of width 32 (bits) or greater are incorrectly extracted due to
a masking bug in hid-core.c:extract(). This patch fixes it up by forcing
the mask to be 64 bits wide.


Signed-off-by: Adam Kropelin <akropel1@rochester.rr.com>


--- linux-2.6.11/drivers/usb/input/hid-core.c	Thu Mar  3 20:40:49 2005
+++ linux-2.6.11.adk/drivers/usb/input/hid-core.c	Sun Mar 13 14:00:47 2005
@@ -757,7 +757,7 @@
 static __inline__ __u32 extract(__u8 *report, unsigned offset, unsigned n)
 {
 	report += (offset >> 5) << 2; offset &= 31;
-	return (le64_to_cpu(get_unaligned((__le64*)report)) >> offset) & ((1 << n) - 1);
+	return (le64_to_cpu(get_unaligned((__le64*)report)) >> offset) & ((1ULL << n) - 1);
 }
 
 static __inline__ void implement(__u8 *report, unsigned offset, unsigned n, __u32 value)

  parent reply	other threads:[~2005-06-26 14:00 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-26 11:03 2.6.12-mm2 Andrew Morton
2005-06-26 11:42 ` 2.6.12-mm2 Russell King
2005-06-26 23:17   ` 2.6.12-mm2 Grant Coady
2005-06-27  8:11     ` 2.6.12-mm2 Russell King
2005-06-26 12:04 ` 2.6.12-mm2 Michał Piotrowski
2005-06-26 14:04 ` ACPI-based PCI resources: PCMCIA bugfix, but resources missing in trees Dominik Brodowski
2005-06-26 19:17   ` Andrew Morton
2005-06-26 19:34     ` Russell King
2005-06-26 20:14     ` Dominik Brodowski
2005-06-27 20:18       ` Rajesh Shah
2005-06-27 20:26         ` Dominik Brodowski
2005-06-27  1:38   ` Grant Coady
2005-06-27  5:59     ` Dominik Brodowski
2005-06-27  8:55       ` Grant Coady
2005-06-26 14:18 ` Adam Kropelin [this message]
2005-06-26 19:25   ` 2.6.12-mm2 Andrew Morton
2005-06-26 19:39     ` 2.6.12-mm2 Vojtech Pavlik
2005-06-27 13:13     ` 2.6.12-mm2 Vojtech Pavlik
2005-06-26 16:05 ` [-mm patch] kernel/irq/autoprobe.c: remove an unused variable Adrian Bunk
2005-06-26 19:51 ` 2.6.12-mm2 Brice Goglin
2005-06-27  0:44 ` 2.6.12-mm2 J.A. Magallon
2005-06-27  0:56   ` 2.6.12-mm2 Andrew Morton
2005-06-27  2:50 ` Problems with Firewire and -mm kernels (was: Re: 2.6.12-mm2) Rogério Brito
2005-06-27 23:45   ` Andrew Morton
2005-06-28  1:00     ` Rogério Brito
2005-06-28  2:22       ` Rogério Brito
2005-06-28  3:22       ` Andrew Morton
2005-06-28  4:00         ` Ben Collins
2005-06-28  6:12           ` Rogério Brito
2005-06-28 16:15             ` Ben Collins
2005-07-01  1:01               ` Problems with Firewire and -mm kernels Rogério Brito
2005-07-01  1:12                 ` Ben Collins
2005-07-01  2:23                   ` Rogério Brito
2005-07-01  2:28                   ` Problems with Firewire and -mm kernels (and vanilla 2.6.13-rc1) Rogério Brito
2005-07-01  2:44                   ` Problems with Firewire and -mm kernels Rogério Brito
2005-07-01  3:18                     ` Ben Collins
2005-07-01  4:01                       ` Dan Dennedy
2005-07-01  4:37                         ` Stefan Richter
2005-07-01  4:12                       ` Stefan Richter
2005-07-01  4:30                       ` Rogério Brito
2005-07-01  5:15                         ` Ben Collins
2005-06-28  7:42         ` Stefan Richter
2005-06-28  7:46           ` Andrew Morton
2005-06-28  8:37             ` Rogério Brito
2005-06-28 16:25               ` Ben Collins
2005-06-28 16:38             ` Giuseppe Bilotta
2005-06-28  8:18           ` Rogério Brito
2005-06-28 18:47             ` Stefan Richter
2005-06-30  0:43           ` Rogério Brito
2005-06-29  0:31 ` [sparc32] Kconfig fixups (was Re: 2.6.12-mm2) William Lee Irwin III
     [not found] <fa.h6rvsi4.j68fhk@ifi.uio.no>
2005-06-27  6:44 ` 2.6.12-mm2 Reuben Farrelly
2005-06-27  7:24   ` 2.6.12-mm2 Andrew Morton
2005-06-27  7:47     ` 2.6.12-mm2 Reuben Farrelly
2005-06-27  8:22       ` 2.6.12-mm2 Andrew Morton
2005-06-27  9:37         ` 2.6.12-mm2 Ingo Molnar
2005-06-27 21:14           ` 2.6.12-mm2 Andrew Morton
2005-06-28  7:30             ` 2.6.12-mm2 Ingo Molnar

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=20050626101851.A18283@mail.kroptech.com \
    --to=akropel1@rochester.rr.com \
    --cc='@mail.kroptech.com \
    --cc=akpm@osdl.org \
    --cc=dtor@mail.ru \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vojtech@suse.cz \
    /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