mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 21:07:02 +09:00
Merge tag 'v4.9.154' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into odroidn2-4.9.y
This is the 4.9.154 stable release
This commit is contained in:
@@ -255,6 +255,8 @@ static const struct xpad_device {
|
||||
{ 0x0f30, 0x0202, "Joytech Advanced Controller", 0, XTYPE_XBOX },
|
||||
{ 0x0f30, 0x8888, "BigBen XBMiniPad Controller", 0, XTYPE_XBOX },
|
||||
{ 0x102c, 0xff0c, "Joytech Wireless Advanced Controller", 0, XTYPE_XBOX },
|
||||
{ 0x1038, 0x1430, "SteelSeries Stratus Duo", 0, XTYPE_XBOX360 },
|
||||
{ 0x1038, 0x1431, "SteelSeries Stratus Duo", 0, XTYPE_XBOX360 },
|
||||
{ 0x11c9, 0x55f0, "Nacon GC-100XF", 0, XTYPE_XBOX360 },
|
||||
{ 0x12ab, 0x0004, "Honey Bee Xbox360 dancepad", MAP_DPAD_TO_BUTTONS, XTYPE_XBOX360 },
|
||||
{ 0x12ab, 0x0301, "PDP AFTERGLOW AX.1", 0, XTYPE_XBOX360 },
|
||||
@@ -431,6 +433,7 @@ static const struct usb_device_id xpad_table[] = {
|
||||
XPAD_XBOXONE_VENDOR(0x0e6f), /* 0x0e6f X-Box One controllers */
|
||||
XPAD_XBOX360_VENDOR(0x0f0d), /* Hori Controllers */
|
||||
XPAD_XBOXONE_VENDOR(0x0f0d), /* Hori Controllers */
|
||||
XPAD_XBOX360_VENDOR(0x1038), /* SteelSeries Controllers */
|
||||
XPAD_XBOX360_VENDOR(0x11c9), /* Nacon GC100XF */
|
||||
XPAD_XBOX360_VENDOR(0x12ab), /* X-Box 360 dance pads */
|
||||
XPAD_XBOX360_VENDOR(0x1430), /* RedOctane X-Box 360 controllers */
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include <linux/fs.h>
|
||||
#include <linux/miscdevice.h>
|
||||
#include <linux/uinput.h>
|
||||
#include <linux/overflow.h>
|
||||
#include <linux/input/mt.h>
|
||||
#include "../input-compat.h"
|
||||
|
||||
@@ -335,7 +336,7 @@ static int uinput_open(struct inode *inode, struct file *file)
|
||||
static int uinput_validate_absinfo(struct input_dev *dev, unsigned int code,
|
||||
const struct input_absinfo *abs)
|
||||
{
|
||||
int min, max;
|
||||
int min, max, range;
|
||||
|
||||
min = abs->minimum;
|
||||
max = abs->maximum;
|
||||
@@ -347,7 +348,7 @@ static int uinput_validate_absinfo(struct input_dev *dev, unsigned int code,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (abs->flat > max - min) {
|
||||
if (!check_sub_overflow(max, min, &range) && abs->flat > range) {
|
||||
printk(KERN_DEBUG
|
||||
"%s: abs_flat #%02x out of range: %d (min:%d/max:%d)\n",
|
||||
UINPUT_NAME, code, abs->flat, min, max);
|
||||
|
||||
Reference in New Issue
Block a user