mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
Merge tag 'v4.9.151' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into odroidn2-4.9.y
This is the 4.9.151 stable release
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,6 +1,6 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 9
|
||||
SUBLEVEL = 150
|
||||
SUBLEVEL = 151
|
||||
EXTRAVERSION =
|
||||
NAME = Roaring Lionus
|
||||
|
||||
|
||||
@@ -131,6 +131,23 @@ void acpi_power_resources_list_free(struct list_head *list)
|
||||
}
|
||||
}
|
||||
|
||||
static bool acpi_power_resource_is_dup(union acpi_object *package,
|
||||
unsigned int start, unsigned int i)
|
||||
{
|
||||
acpi_handle rhandle, dup;
|
||||
unsigned int j;
|
||||
|
||||
/* The caller is expected to check the package element types */
|
||||
rhandle = package->package.elements[i].reference.handle;
|
||||
for (j = start; j < i; j++) {
|
||||
dup = package->package.elements[j].reference.handle;
|
||||
if (dup == rhandle)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
int acpi_extract_power_resources(union acpi_object *package, unsigned int start,
|
||||
struct list_head *list)
|
||||
{
|
||||
@@ -150,6 +167,11 @@ int acpi_extract_power_resources(union acpi_object *package, unsigned int start,
|
||||
err = -ENODEV;
|
||||
break;
|
||||
}
|
||||
|
||||
/* Some ACPI tables contain duplicate power resource references */
|
||||
if (acpi_power_resource_is_dup(package, start, i))
|
||||
continue;
|
||||
|
||||
err = acpi_add_power_resource(rhandle);
|
||||
if (err)
|
||||
break;
|
||||
|
||||
@@ -6346,7 +6346,6 @@ static ssize_t do_rbd_remove(struct bus_type *bus,
|
||||
struct list_head *tmp;
|
||||
int dev_id;
|
||||
char opt_buf[6];
|
||||
bool already = false;
|
||||
bool force = false;
|
||||
int ret;
|
||||
|
||||
@@ -6379,13 +6378,13 @@ static ssize_t do_rbd_remove(struct bus_type *bus,
|
||||
spin_lock_irq(&rbd_dev->lock);
|
||||
if (rbd_dev->open_count && !force)
|
||||
ret = -EBUSY;
|
||||
else
|
||||
already = test_and_set_bit(RBD_DEV_FLAG_REMOVING,
|
||||
&rbd_dev->flags);
|
||||
else if (test_and_set_bit(RBD_DEV_FLAG_REMOVING,
|
||||
&rbd_dev->flags))
|
||||
ret = -EINPROGRESS;
|
||||
spin_unlock_irq(&rbd_dev->lock);
|
||||
}
|
||||
spin_unlock(&rbd_dev_list_lock);
|
||||
if (ret < 0 || already)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (force) {
|
||||
|
||||
@@ -461,9 +461,15 @@ static long i2cdev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
||||
return i2cdev_ioctl_smbus(client, arg);
|
||||
|
||||
case I2C_RETRIES:
|
||||
if (arg > INT_MAX)
|
||||
return -EINVAL;
|
||||
|
||||
client->adapter->retries = arg;
|
||||
break;
|
||||
case I2C_TIMEOUT:
|
||||
if (arg > INT_MAX)
|
||||
return -EINVAL;
|
||||
|
||||
/* For historical reasons, user-space sets the timeout
|
||||
* value in units of 10 ms.
|
||||
*/
|
||||
|
||||
@@ -1828,6 +1828,13 @@ static const struct usb_device_id acm_ids[] = {
|
||||
.driver_info = IGNORE_DEVICE,
|
||||
},
|
||||
|
||||
{ USB_DEVICE(0x1bc7, 0x0021), /* Telit 3G ACM only composition */
|
||||
.driver_info = SEND_ZERO_PACKET,
|
||||
},
|
||||
{ USB_DEVICE(0x1bc7, 0x0023), /* Telit 3G ACM + ECM composition */
|
||||
.driver_info = SEND_ZERO_PACKET,
|
||||
},
|
||||
|
||||
/* control interfaces without any protocol set */
|
||||
{ USB_INTERFACE_INFO(USB_CLASS_COMM, USB_CDC_SUBCLASS_ACM,
|
||||
USB_CDC_PROTO_NONE) },
|
||||
|
||||
@@ -240,7 +240,8 @@ static const struct usb_device_id usb_quirk_list[] = {
|
||||
USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL },
|
||||
|
||||
/* Corsair K70 RGB */
|
||||
{ USB_DEVICE(0x1b1c, 0x1b13), .driver_info = USB_QUIRK_DELAY_INIT },
|
||||
{ USB_DEVICE(0x1b1c, 0x1b13), .driver_info = USB_QUIRK_DELAY_INIT |
|
||||
USB_QUIRK_DELAY_CTRL_MSG },
|
||||
|
||||
/* Corsair Strafe */
|
||||
{ USB_DEVICE(0x1b1c, 0x1b15), .driver_info = USB_QUIRK_DELAY_INIT |
|
||||
|
||||
@@ -251,8 +251,12 @@ static int slave_configure(struct scsi_device *sdev)
|
||||
if (!(us->fflags & US_FL_NEEDS_CAP16))
|
||||
sdev->try_rc_10_first = 1;
|
||||
|
||||
/* assume SPC3 or latter devices support sense size > 18 */
|
||||
if (sdev->scsi_level > SCSI_SPC_2)
|
||||
/*
|
||||
* assume SPC3 or latter devices support sense size > 18
|
||||
* unless US_FL_BAD_SENSE quirk is specified.
|
||||
*/
|
||||
if (sdev->scsi_level > SCSI_SPC_2 &&
|
||||
!(us->fflags & US_FL_BAD_SENSE))
|
||||
us->fflags |= US_FL_SANE_SENSE;
|
||||
|
||||
/*
|
||||
|
||||
@@ -1284,6 +1284,18 @@ UNUSUAL_DEV( 0x090c, 0x1132, 0x0000, 0xffff,
|
||||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
US_FL_FIX_CAPACITY ),
|
||||
|
||||
/*
|
||||
* Reported by Icenowy Zheng <icenowy@aosc.io>
|
||||
* The SMI SM3350 USB-UFS bridge controller will enter a wrong state
|
||||
* that do not process read/write command if a long sense is requested,
|
||||
* so force to use 18-byte sense.
|
||||
*/
|
||||
UNUSUAL_DEV( 0x090c, 0x3350, 0x0000, 0xffff,
|
||||
"SMI",
|
||||
"SM3350 UFS-to-USB-Mass-Storage bridge",
|
||||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
US_FL_BAD_SENSE ),
|
||||
|
||||
/*
|
||||
* Reported by Paul Hartman <paul.hartman+linux@gmail.com>
|
||||
* This card reader returns "Illegal Request, Logical Block Address
|
||||
|
||||
@@ -1118,10 +1118,10 @@ cifs_push_mandatory_locks(struct cifsFileInfo *cfile)
|
||||
|
||||
/*
|
||||
* Accessing maxBuf is racy with cifs_reconnect - need to store value
|
||||
* and check it for zero before using.
|
||||
* and check it before using.
|
||||
*/
|
||||
max_buf = tcon->ses->server->maxBuf;
|
||||
if (!max_buf) {
|
||||
if (max_buf < (sizeof(struct smb_hdr) + sizeof(LOCKING_ANDX_RANGE))) {
|
||||
free_xid(xid);
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -1456,10 +1456,10 @@ cifs_unlock_range(struct cifsFileInfo *cfile, struct file_lock *flock,
|
||||
|
||||
/*
|
||||
* Accessing maxBuf is racy with cifs_reconnect - need to store value
|
||||
* and check it for zero before using.
|
||||
* and check it before using.
|
||||
*/
|
||||
max_buf = tcon->ses->server->maxBuf;
|
||||
if (!max_buf)
|
||||
if (max_buf < (sizeof(struct smb_hdr) + sizeof(LOCKING_ANDX_RANGE)))
|
||||
return -EINVAL;
|
||||
|
||||
max_num = (max_buf - sizeof(struct smb_hdr)) /
|
||||
|
||||
@@ -123,10 +123,10 @@ smb2_unlock_range(struct cifsFileInfo *cfile, struct file_lock *flock,
|
||||
|
||||
/*
|
||||
* Accessing maxBuf is racy with cifs_reconnect - need to store value
|
||||
* and check it for zero before using.
|
||||
* and check it before using.
|
||||
*/
|
||||
max_buf = tcon->ses->server->maxBuf;
|
||||
if (!max_buf)
|
||||
if (max_buf < sizeof(struct smb2_lock_element))
|
||||
return -EINVAL;
|
||||
|
||||
max_num = max_buf / sizeof(struct smb2_lock_element);
|
||||
|
||||
@@ -301,7 +301,7 @@ uncork:
|
||||
if (rc < 0 && rc != -EINTR)
|
||||
cifs_dbg(VFS, "Error %d sending data on socket to server\n",
|
||||
rc);
|
||||
else
|
||||
else if (rc > 0)
|
||||
rc = 0;
|
||||
|
||||
return rc;
|
||||
|
||||
@@ -1873,12 +1873,12 @@ int ext4_inline_data_fiemap(struct inode *inode,
|
||||
physical += (char *)ext4_raw_inode(&iloc) - iloc.bh->b_data;
|
||||
physical += offsetof(struct ext4_inode, i_block);
|
||||
|
||||
if (physical)
|
||||
error = fiemap_fill_next_extent(fieinfo, start, physical,
|
||||
inline_len, flags);
|
||||
brelse(iloc.bh);
|
||||
out:
|
||||
up_read(&EXT4_I(inode)->xattr_sem);
|
||||
if (physical)
|
||||
error = fiemap_fill_next_extent(fieinfo, start, physical,
|
||||
inline_len, flags);
|
||||
return (error < 0 ? error : 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -2712,7 +2712,8 @@ static int ext4_writepages(struct address_space *mapping,
|
||||
* We may need to convert up to one extent per block in
|
||||
* the page and we may dirty the inode.
|
||||
*/
|
||||
rsv_blocks = 1 + (PAGE_SIZE >> inode->i_blkbits);
|
||||
rsv_blocks = 1 + ext4_chunk_trans_blocks(inode,
|
||||
PAGE_SIZE >> inode->i_blkbits);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -4686,7 +4686,7 @@ static int ext4_commit_super(struct super_block *sb, int sync)
|
||||
ext4_superblock_csum_set(sb);
|
||||
if (sync)
|
||||
lock_buffer(sbh);
|
||||
if (buffer_write_io_error(sbh)) {
|
||||
if (buffer_write_io_error(sbh) || !buffer_uptodate(sbh)) {
|
||||
/*
|
||||
* Oh, dear. A previous attempt to write the
|
||||
* superblock failed. This could happen because the
|
||||
|
||||
@@ -291,9 +291,12 @@ struct svc_rqst {
|
||||
struct svc_cacherep * rq_cacherep; /* cache info */
|
||||
struct task_struct *rq_task; /* service thread */
|
||||
spinlock_t rq_lock; /* per-request lock */
|
||||
struct net *rq_bc_net; /* pointer to backchannel's
|
||||
* net namespace
|
||||
*/
|
||||
};
|
||||
|
||||
#define SVC_NET(svc_rqst) (svc_rqst->rq_xprt->xpt_net)
|
||||
#define SVC_NET(rqst) (rqst->rq_xprt ? rqst->rq_xprt->xpt_net : rqst->rq_bc_net)
|
||||
|
||||
/*
|
||||
* Rigorous type checking on sockaddr type conversions
|
||||
|
||||
@@ -682,8 +682,10 @@ static struct alien_cache *__alloc_alien_cache(int node, int entries,
|
||||
struct alien_cache *alc = NULL;
|
||||
|
||||
alc = kmalloc_node(memsize, gfp, node);
|
||||
init_arraycache(&alc->ac, entries, batch);
|
||||
spin_lock_init(&alc->lock);
|
||||
if (alc) {
|
||||
init_arraycache(&alc->ac, entries, batch);
|
||||
spin_lock_init(&alc->lock);
|
||||
}
|
||||
return alc;
|
||||
}
|
||||
|
||||
|
||||
@@ -389,7 +389,7 @@ bool page_mapped(struct page *page)
|
||||
return true;
|
||||
if (PageHuge(page))
|
||||
return false;
|
||||
for (i = 0; i < hpage_nr_pages(page); i++) {
|
||||
for (i = 0; i < (1 << compound_order(page)); i++) {
|
||||
if (atomic_read(&page[i]._mapcount) >= 0)
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1137,6 +1137,8 @@ void svc_printk(struct svc_rqst *rqstp, const char *fmt, ...)
|
||||
static __printf(2,3) void svc_printk(struct svc_rqst *rqstp, const char *fmt, ...) {}
|
||||
#endif
|
||||
|
||||
extern void svc_tcp_prep_reply_hdr(struct svc_rqst *);
|
||||
|
||||
/*
|
||||
* Common routine for processing the RPC request.
|
||||
*/
|
||||
@@ -1166,7 +1168,8 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv)
|
||||
clear_bit(RQ_DROPME, &rqstp->rq_flags);
|
||||
|
||||
/* Setup reply header */
|
||||
rqstp->rq_xprt->xpt_ops->xpo_prep_reply_hdr(rqstp);
|
||||
if (rqstp->rq_prot == IPPROTO_TCP)
|
||||
svc_tcp_prep_reply_hdr(rqstp);
|
||||
|
||||
svc_putu32(resv, rqstp->rq_xid);
|
||||
|
||||
@@ -1312,7 +1315,7 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv)
|
||||
return 0;
|
||||
|
||||
close:
|
||||
if (test_bit(XPT_TEMP, &rqstp->rq_xprt->xpt_flags))
|
||||
if (rqstp->rq_xprt && test_bit(XPT_TEMP, &rqstp->rq_xprt->xpt_flags))
|
||||
svc_close_xprt(rqstp->rq_xprt);
|
||||
dprintk("svc: svc_process close\n");
|
||||
return 0;
|
||||
@@ -1439,10 +1442,10 @@ bc_svc_process(struct svc_serv *serv, struct rpc_rqst *req,
|
||||
dprintk("svc: %s(%p)\n", __func__, req);
|
||||
|
||||
/* Build the svc_rqst used by the common processing routine */
|
||||
rqstp->rq_xprt = serv->sv_bc_xprt;
|
||||
rqstp->rq_xid = req->rq_xid;
|
||||
rqstp->rq_prot = req->rq_xprt->prot;
|
||||
rqstp->rq_server = serv;
|
||||
rqstp->rq_bc_net = req->rq_xprt->xprt_net;
|
||||
|
||||
rqstp->rq_addrlen = sizeof(req->rq_xprt->addr);
|
||||
memcpy(&rqstp->rq_addr, &req->rq_xprt->addr, rqstp->rq_addrlen);
|
||||
|
||||
@@ -510,10 +510,11 @@ out:
|
||||
*/
|
||||
void svc_reserve(struct svc_rqst *rqstp, int space)
|
||||
{
|
||||
struct svc_xprt *xprt = rqstp->rq_xprt;
|
||||
|
||||
space += rqstp->rq_res.head[0].iov_len;
|
||||
|
||||
if (space < rqstp->rq_reserved) {
|
||||
struct svc_xprt *xprt = rqstp->rq_xprt;
|
||||
if (xprt && space < rqstp->rq_reserved) {
|
||||
atomic_sub((rqstp->rq_reserved - space), &xprt->xpt_reserved);
|
||||
rqstp->rq_reserved = space;
|
||||
|
||||
|
||||
@@ -1195,7 +1195,7 @@ static int svc_tcp_sendto(struct svc_rqst *rqstp)
|
||||
/*
|
||||
* Setup response header. TCP has a 4B record length field.
|
||||
*/
|
||||
static void svc_tcp_prep_reply_hdr(struct svc_rqst *rqstp)
|
||||
void svc_tcp_prep_reply_hdr(struct svc_rqst *rqstp)
|
||||
{
|
||||
struct kvec *resv = &rqstp->rq_res.head[0];
|
||||
|
||||
|
||||
@@ -4841,6 +4841,13 @@ static void alc280_fixup_hp_9480m(struct hda_codec *codec,
|
||||
}
|
||||
}
|
||||
|
||||
static void alc_fixup_disable_mic_vref(struct hda_codec *codec,
|
||||
const struct hda_fixup *fix, int action)
|
||||
{
|
||||
if (action == HDA_FIXUP_ACT_PRE_PROBE)
|
||||
snd_hda_codec_set_pin_target(codec, 0x19, PIN_VREFHIZ);
|
||||
}
|
||||
|
||||
/* for hda_fixup_thinkpad_acpi() */
|
||||
#include "thinkpad_helper.c"
|
||||
|
||||
@@ -4947,6 +4954,7 @@ enum {
|
||||
ALC293_FIXUP_LENOVO_SPK_NOISE,
|
||||
ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY,
|
||||
ALC255_FIXUP_DELL_SPK_NOISE,
|
||||
ALC225_FIXUP_DISABLE_MIC_VREF,
|
||||
ALC225_FIXUP_DELL1_MIC_NO_PRESENCE,
|
||||
ALC295_FIXUP_DISABLE_DAC3,
|
||||
ALC280_FIXUP_HP_HEADSET_MIC,
|
||||
@@ -5605,6 +5613,12 @@ static const struct hda_fixup alc269_fixups[] = {
|
||||
.chained = true,
|
||||
.chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
|
||||
},
|
||||
[ALC225_FIXUP_DISABLE_MIC_VREF] = {
|
||||
.type = HDA_FIXUP_FUNC,
|
||||
.v.func = alc_fixup_disable_mic_vref,
|
||||
.chained = true,
|
||||
.chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
|
||||
},
|
||||
[ALC225_FIXUP_DELL1_MIC_NO_PRESENCE] = {
|
||||
.type = HDA_FIXUP_VERBS,
|
||||
.v.verbs = (const struct hda_verb[]) {
|
||||
@@ -5614,7 +5628,7 @@ static const struct hda_fixup alc269_fixups[] = {
|
||||
{}
|
||||
},
|
||||
.chained = true,
|
||||
.chain_id = ALC269_FIXUP_DELL1_MIC_NO_PRESENCE
|
||||
.chain_id = ALC225_FIXUP_DISABLE_MIC_VREF
|
||||
},
|
||||
[ALC280_FIXUP_HP_HEADSET_MIC] = {
|
||||
.type = HDA_FIXUP_FUNC,
|
||||
|
||||
Reference in New Issue
Block a user