mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-11 05:17:10 +09:00
Merge tag 'v4.9.265' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into odroidg12-4.9.y
This is the 4.9.265 stable release Change-Id: Ie748f79adf441d896fb2032cf63d699b06f3f908
This commit is contained in:
2
Makefile
2
Makefile
@@ -1,6 +1,6 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 9
|
||||
SUBLEVEL = 264
|
||||
SUBLEVEL = 265
|
||||
EXTRAVERSION =
|
||||
NAME = Roaring Lionus
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include <linux/bug.h>
|
||||
#include <asm/cputable.h>
|
||||
|
||||
static inline bool early_cpu_has_feature(unsigned long feature)
|
||||
static __always_inline bool early_cpu_has_feature(unsigned long feature)
|
||||
{
|
||||
return !!((CPU_FTRS_ALWAYS & feature) ||
|
||||
(CPU_FTRS_POSSIBLE & cur_cpu_spec->cpu_features & feature));
|
||||
@@ -45,7 +45,7 @@ static __always_inline bool cpu_has_feature(unsigned long feature)
|
||||
return static_branch_likely(&cpu_feature_keys[i]);
|
||||
}
|
||||
#else
|
||||
static inline bool cpu_has_feature(unsigned long feature)
|
||||
static __always_inline bool cpu_has_feature(unsigned long feature)
|
||||
{
|
||||
return early_cpu_has_feature(feature);
|
||||
}
|
||||
|
||||
@@ -1246,6 +1246,7 @@ int extcon_dev_register(struct extcon_dev *edev)
|
||||
sizeof(*edev->nh) * edev->max_supported, GFP_KERNEL);
|
||||
if (!edev->nh) {
|
||||
ret = -ENOMEM;
|
||||
device_unregister(&edev->dev);
|
||||
goto err_dev;
|
||||
}
|
||||
|
||||
|
||||
@@ -359,6 +359,7 @@ nosy_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
||||
struct client *client = file->private_data;
|
||||
spinlock_t *client_list_lock = &client->lynx->client_list_lock;
|
||||
struct nosy_stats stats;
|
||||
int ret;
|
||||
|
||||
switch (cmd) {
|
||||
case NOSY_IOC_GET_STATS:
|
||||
@@ -373,11 +374,15 @@ nosy_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
||||
return 0;
|
||||
|
||||
case NOSY_IOC_START:
|
||||
ret = -EBUSY;
|
||||
spin_lock_irq(client_list_lock);
|
||||
list_add_tail(&client->link, &client->lynx->client_list);
|
||||
if (list_empty(&client->link)) {
|
||||
list_add_tail(&client->link, &client->lynx->client_list);
|
||||
ret = 0;
|
||||
}
|
||||
spin_unlock_irq(client_list_lock);
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
|
||||
case NOSY_IOC_STOP:
|
||||
spin_lock_irq(client_list_lock);
|
||||
|
||||
@@ -923,6 +923,8 @@ static int lmc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
break;
|
||||
default:
|
||||
printk(KERN_WARNING "%s: LMC UNKNOWN CARD!\n", dev->name);
|
||||
unregister_hdlc_device(dev);
|
||||
return -EIO;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -2367,12 +2367,15 @@ static int __maybe_unused rockchip_pinctrl_suspend(struct device *dev)
|
||||
static int __maybe_unused rockchip_pinctrl_resume(struct device *dev)
|
||||
{
|
||||
struct rockchip_pinctrl *info = dev_get_drvdata(dev);
|
||||
int ret = regmap_write(info->regmap_base, RK3288_GRF_GPIO6C_IOMUX,
|
||||
rk3288_grf_gpio6c_iomux |
|
||||
GPIO6C6_SEL_WRITE_ENABLE);
|
||||
int ret;
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
if (info->ctrl->type == RK3288) {
|
||||
ret = regmap_write(info->regmap_base, RK3288_GRF_GPIO6C_IOMUX,
|
||||
rk3288_grf_gpio6c_iomux |
|
||||
GPIO6C6_SEL_WRITE_ENABLE);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
return pinctrl_force_default(info->pctl_dev);
|
||||
}
|
||||
|
||||
@@ -112,7 +112,6 @@
|
||||
(min(1270, ((ql) > 0) ? (QLA_TGT_DATASEGS_PER_CMD_24XX + \
|
||||
QLA_TGT_DATASEGS_PER_CONT_24XX*((ql) - 1)) : 0))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define GET_TARGET_ID(ha, iocb) ((HAS_EXTENDED_IDS(ha)) \
|
||||
? le16_to_cpu((iocb)->u.isp2x.target.extended) \
|
||||
@@ -323,6 +322,7 @@ struct ctio_to_2xxx {
|
||||
#ifndef CTIO_RET_TYPE
|
||||
#define CTIO_RET_TYPE 0x17 /* CTIO return entry */
|
||||
#define ATIO_TYPE7 0x06 /* Accept target I/O entry for 24xx */
|
||||
#endif
|
||||
|
||||
struct fcp_hdr {
|
||||
uint8_t r_ctl;
|
||||
|
||||
@@ -1267,8 +1267,8 @@ static int st_open(struct inode *inode, struct file *filp)
|
||||
spin_lock(&st_use_lock);
|
||||
if (STp->in_use) {
|
||||
spin_unlock(&st_use_lock);
|
||||
scsi_tape_put(STp);
|
||||
DEBC_printk(STp, "Device already in use.\n");
|
||||
scsi_tape_put(STp);
|
||||
return (-EBUSY);
|
||||
}
|
||||
|
||||
|
||||
@@ -1290,7 +1290,7 @@ static int cb_pcidas_auto_attach(struct comedi_device *dev,
|
||||
devpriv->amcc + AMCC_OP_REG_INTCSR);
|
||||
|
||||
ret = request_irq(pcidev->irq, cb_pcidas_interrupt, IRQF_SHARED,
|
||||
dev->board_name, dev);
|
||||
"cb_pcidas", dev);
|
||||
if (ret) {
|
||||
dev_dbg(dev->class_dev, "unable to allocate irq %d\n",
|
||||
pcidev->irq);
|
||||
|
||||
@@ -4034,7 +4034,7 @@ static int auto_attach(struct comedi_device *dev,
|
||||
init_stc_registers(dev);
|
||||
|
||||
retval = request_irq(pcidev->irq, handle_interrupt, IRQF_SHARED,
|
||||
dev->board_name, dev);
|
||||
"cb_pcidas64", dev);
|
||||
if (retval) {
|
||||
dev_dbg(dev->class_dev, "unable to allocate irq %u\n",
|
||||
pcidev->irq);
|
||||
|
||||
@@ -1160,7 +1160,7 @@ struct rtllib_network {
|
||||
bool bWithAironetIE;
|
||||
bool bCkipSupported;
|
||||
bool bCcxRmEnable;
|
||||
u16 CcxRmState[2];
|
||||
u8 CcxRmState[2];
|
||||
bool bMBssidValid;
|
||||
u8 MBssidMask;
|
||||
u8 MBssid[ETH_ALEN];
|
||||
|
||||
@@ -1986,7 +1986,7 @@ static void rtllib_parse_mife_generic(struct rtllib_device *ieee,
|
||||
info_element->data[2] == 0x96 &&
|
||||
info_element->data[3] == 0x01) {
|
||||
if (info_element->len == 6) {
|
||||
memcpy(network->CcxRmState, &info_element[4], 2);
|
||||
memcpy(network->CcxRmState, &info_element->data[4], 2);
|
||||
if (network->CcxRmState[0] != 0)
|
||||
network->bCcxRmEnable = true;
|
||||
else
|
||||
|
||||
@@ -335,8 +335,10 @@ static void acm_ctrl_irq(struct urb *urb)
|
||||
acm->iocount.dsr++;
|
||||
if (difference & ACM_CTRL_DCD)
|
||||
acm->iocount.dcd++;
|
||||
if (newctrl & ACM_CTRL_BRK)
|
||||
if (newctrl & ACM_CTRL_BRK) {
|
||||
acm->iocount.brk++;
|
||||
tty_insert_flip_char(&acm->port, 0, TTY_BREAK);
|
||||
}
|
||||
if (newctrl & ACM_CTRL_RI)
|
||||
acm->iocount.rng++;
|
||||
if (newctrl & ACM_CTRL_FRAMING)
|
||||
@@ -541,7 +543,8 @@ static void acm_port_dtr_rts(struct tty_port *port, int raise)
|
||||
|
||||
res = acm_set_control(acm, val);
|
||||
if (res && (acm->ctrl_caps & USB_CDC_CAP_LINE))
|
||||
dev_err(&acm->control->dev, "failed to set dtr/rts\n");
|
||||
/* This is broken in too many devices to spam the logs */
|
||||
dev_dbg(&acm->control->dev, "failed to set dtr/rts\n");
|
||||
}
|
||||
|
||||
static int acm_port_activate(struct tty_port *port, struct tty_struct *tty)
|
||||
@@ -1457,6 +1460,11 @@ skip_countries:
|
||||
|
||||
return 0;
|
||||
alloc_fail8:
|
||||
if (!acm->combined_interfaces) {
|
||||
/* Clear driver data so that disconnect() returns early. */
|
||||
usb_set_intfdata(data_interface, NULL);
|
||||
usb_driver_release_interface(&acm_driver, data_interface);
|
||||
}
|
||||
if (acm->country_codes) {
|
||||
device_remove_file(&acm->control->dev,
|
||||
&dev_attr_wCountryCodes);
|
||||
|
||||
@@ -321,6 +321,10 @@ static const struct usb_device_id usb_quirk_list[] = {
|
||||
/* DJI CineSSD */
|
||||
{ USB_DEVICE(0x2ca3, 0x0031), .driver_info = USB_QUIRK_NO_LPM },
|
||||
|
||||
/* Fibocom L850-GL LTE Modem */
|
||||
{ USB_DEVICE(0x2cb7, 0x0007), .driver_info =
|
||||
USB_QUIRK_IGNORE_REMOTE_WAKEUP },
|
||||
|
||||
/* INTEL VALUE SSD */
|
||||
{ USB_DEVICE(0x8086, 0xf1a5), .driver_info = USB_QUIRK_RESET_RESUME },
|
||||
|
||||
|
||||
@@ -470,6 +470,13 @@ static void xhci_mtk_quirks(struct device *dev, struct xhci_hcd *xhci)
|
||||
xhci->quirks |= XHCI_SPURIOUS_SUCCESS;
|
||||
if (mtk->lpm_support)
|
||||
xhci->quirks |= XHCI_LPM_SUPPORT;
|
||||
|
||||
/*
|
||||
* MTK xHCI 0.96: PSA is 1 by default even if doesn't support stream,
|
||||
* and it's 3 when support it.
|
||||
*/
|
||||
if (xhci->hci_version < 0x100 && HCC_MAX_PSA(xhci->hcc_params) == 4)
|
||||
xhci->quirks |= XHCI_BROKEN_STREAMS;
|
||||
}
|
||||
|
||||
/* called during probe() after chip reset completes */
|
||||
@@ -636,7 +643,8 @@ static int xhci_mtk_probe(struct platform_device *pdev)
|
||||
if (ret)
|
||||
goto put_usb3_hcd;
|
||||
|
||||
if (HCC_MAX_PSA(xhci->hcc_params) >= 4)
|
||||
if (HCC_MAX_PSA(xhci->hcc_params) >= 4 &&
|
||||
!(xhci->quirks & XHCI_BROKEN_STREAMS))
|
||||
xhci->shared_hcd->can_do_streams = 1;
|
||||
|
||||
ret = usb_add_hcd(xhci->shared_hcd, irq, IRQF_SHARED);
|
||||
|
||||
@@ -306,8 +306,8 @@ static void vhost_vq_reset(struct vhost_dev *dev,
|
||||
vq->call_ctx = NULL;
|
||||
vq->call = NULL;
|
||||
vq->log_ctx = NULL;
|
||||
vhost_reset_is_le(vq);
|
||||
vhost_disable_cross_endian(vq);
|
||||
vhost_reset_is_le(vq);
|
||||
vq->busyloop_timeout = 0;
|
||||
vq->umem = NULL;
|
||||
vq->iotlb = NULL;
|
||||
|
||||
@@ -2028,13 +2028,13 @@ static int __ext4_journalled_writepage(struct page *page,
|
||||
if (!ret)
|
||||
ret = err;
|
||||
|
||||
if (!ext4_has_inline_data(inode))
|
||||
ext4_walk_page_buffers(NULL, page_bufs, 0, len,
|
||||
NULL, bput_one);
|
||||
ext4_set_inode_state(inode, EXT4_STATE_JDATA);
|
||||
out:
|
||||
unlock_page(page);
|
||||
out_no_pagelock:
|
||||
if (!inline_data && page_bufs)
|
||||
ext4_walk_page_buffers(NULL, page_bufs, 0, len,
|
||||
NULL, bput_one);
|
||||
brelse(inode_bh);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -3563,7 +3563,7 @@ static int ext4_rename(struct inode *old_dir, struct dentry *old_dentry,
|
||||
*/
|
||||
retval = -ENOENT;
|
||||
if (!old.bh || le32_to_cpu(old.de->inode) != old.inode->i_ino)
|
||||
goto end_rename;
|
||||
goto release_bh;
|
||||
|
||||
if ((old.dir != new.dir) &&
|
||||
ext4_encrypted_inode(new.dir) &&
|
||||
@@ -3577,7 +3577,7 @@ static int ext4_rename(struct inode *old_dir, struct dentry *old_dentry,
|
||||
if (IS_ERR(new.bh)) {
|
||||
retval = PTR_ERR(new.bh);
|
||||
new.bh = NULL;
|
||||
goto end_rename;
|
||||
goto release_bh;
|
||||
}
|
||||
if (new.bh) {
|
||||
if (!new.inode) {
|
||||
@@ -3594,15 +3594,13 @@ static int ext4_rename(struct inode *old_dir, struct dentry *old_dentry,
|
||||
handle = ext4_journal_start(old.dir, EXT4_HT_DIR, credits);
|
||||
if (IS_ERR(handle)) {
|
||||
retval = PTR_ERR(handle);
|
||||
handle = NULL;
|
||||
goto end_rename;
|
||||
goto release_bh;
|
||||
}
|
||||
} else {
|
||||
whiteout = ext4_whiteout_for_rename(&old, credits, &handle);
|
||||
if (IS_ERR(whiteout)) {
|
||||
retval = PTR_ERR(whiteout);
|
||||
whiteout = NULL;
|
||||
goto end_rename;
|
||||
goto release_bh;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3710,16 +3708,18 @@ end_rename:
|
||||
ext4_resetent(handle, &old,
|
||||
old.inode->i_ino, old_file_type);
|
||||
drop_nlink(whiteout);
|
||||
ext4_orphan_add(handle, whiteout);
|
||||
}
|
||||
unlock_new_inode(whiteout);
|
||||
ext4_journal_stop(handle);
|
||||
iput(whiteout);
|
||||
|
||||
} else {
|
||||
ext4_journal_stop(handle);
|
||||
}
|
||||
release_bh:
|
||||
brelse(old.dir_bh);
|
||||
brelse(old.bh);
|
||||
brelse(new.bh);
|
||||
if (handle)
|
||||
ext4_journal_stop(handle);
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ void reiserfs_security_free(struct reiserfs_security_handle *sec);
|
||||
|
||||
static inline int reiserfs_xattrs_initialized(struct super_block *sb)
|
||||
{
|
||||
return REISERFS_SB(sb)->priv_root != NULL;
|
||||
return REISERFS_SB(sb)->priv_root && REISERFS_SB(sb)->xattr_root;
|
||||
}
|
||||
|
||||
#define xattr_size(size) ((size) + sizeof(struct reiserfs_xattr_header))
|
||||
|
||||
@@ -535,7 +535,7 @@ static int kauditd_thread(void *dummy)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int audit_send_list(void *_dest)
|
||||
int audit_send_list_thread(void *_dest)
|
||||
{
|
||||
struct audit_netlink_list *dest = _dest;
|
||||
struct sk_buff *skb;
|
||||
@@ -580,6 +580,18 @@ out_kfree_skb:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void audit_free_reply(struct audit_reply *reply)
|
||||
{
|
||||
if (!reply)
|
||||
return;
|
||||
|
||||
if (reply->skb)
|
||||
kfree_skb(reply->skb);
|
||||
if (reply->net)
|
||||
put_net(reply->net);
|
||||
kfree(reply);
|
||||
}
|
||||
|
||||
static int audit_send_reply_thread(void *arg)
|
||||
{
|
||||
struct audit_reply *reply = (struct audit_reply *)arg;
|
||||
@@ -592,8 +604,8 @@ static int audit_send_reply_thread(void *arg)
|
||||
/* Ignore failure. It'll only happen if the sender goes away,
|
||||
because our timeout is set to infinite. */
|
||||
netlink_unicast(aunet->nlsk , reply->skb, reply->portid, 0);
|
||||
put_net(net);
|
||||
kfree(reply);
|
||||
reply->skb = NULL;
|
||||
audit_free_reply(reply);
|
||||
return 0;
|
||||
}
|
||||
/**
|
||||
@@ -606,36 +618,34 @@ static int audit_send_reply_thread(void *arg)
|
||||
* @payload: payload data
|
||||
* @size: payload size
|
||||
*
|
||||
* Allocates an skb, builds the netlink message, and sends it to the port id.
|
||||
* No failure notifications.
|
||||
* Allocates a skb, builds the netlink message, and sends it to the port id.
|
||||
*/
|
||||
static void audit_send_reply(struct sk_buff *request_skb, int seq, int type, int done,
|
||||
int multi, const void *payload, int size)
|
||||
{
|
||||
u32 portid = NETLINK_CB(request_skb).portid;
|
||||
struct net *net = sock_net(NETLINK_CB(request_skb).sk);
|
||||
struct sk_buff *skb;
|
||||
struct task_struct *tsk;
|
||||
struct audit_reply *reply = kmalloc(sizeof(struct audit_reply),
|
||||
GFP_KERNEL);
|
||||
struct audit_reply *reply;
|
||||
|
||||
reply = kzalloc(sizeof(*reply), GFP_KERNEL);
|
||||
if (!reply)
|
||||
return;
|
||||
|
||||
skb = audit_make_reply(portid, seq, type, done, multi, payload, size);
|
||||
if (!skb)
|
||||
goto out;
|
||||
reply->skb = audit_make_reply(portid, seq, type, done, multi, payload, size);
|
||||
if (!reply->skb)
|
||||
goto err;
|
||||
|
||||
reply->net = get_net(net);
|
||||
reply->net = get_net(sock_net(NETLINK_CB(request_skb).sk));
|
||||
reply->portid = portid;
|
||||
reply->skb = skb;
|
||||
|
||||
tsk = kthread_run(audit_send_reply_thread, reply, "audit_send_reply");
|
||||
if (!IS_ERR(tsk))
|
||||
return;
|
||||
kfree_skb(skb);
|
||||
out:
|
||||
kfree(reply);
|
||||
if (IS_ERR(tsk))
|
||||
goto err;
|
||||
|
||||
return;
|
||||
|
||||
err:
|
||||
audit_free_reply(reply);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -245,7 +245,7 @@ struct audit_netlink_list {
|
||||
struct sk_buff_head q;
|
||||
};
|
||||
|
||||
int audit_send_list(void *);
|
||||
int audit_send_list_thread(void *);
|
||||
|
||||
struct audit_net {
|
||||
struct sock *nlsk;
|
||||
|
||||
@@ -1139,10 +1139,8 @@ int audit_rule_change(int type, __u32 portid, int seq, void *data,
|
||||
int audit_list_rules_send(struct sk_buff *request_skb, int seq)
|
||||
{
|
||||
u32 portid = NETLINK_CB(request_skb).portid;
|
||||
struct net *net = sock_net(NETLINK_CB(request_skb).sk);
|
||||
struct task_struct *tsk;
|
||||
struct audit_netlink_list *dest;
|
||||
int err = 0;
|
||||
|
||||
/* We can't just spew out the rules here because we might fill
|
||||
* the available socket buffer space and deadlock waiting for
|
||||
@@ -1150,10 +1148,10 @@ int audit_list_rules_send(struct sk_buff *request_skb, int seq)
|
||||
* happen if we're actually running in the context of auditctl
|
||||
* trying to _send_ the stuff */
|
||||
|
||||
dest = kmalloc(sizeof(struct audit_netlink_list), GFP_KERNEL);
|
||||
dest = kmalloc(sizeof(*dest), GFP_KERNEL);
|
||||
if (!dest)
|
||||
return -ENOMEM;
|
||||
dest->net = get_net(net);
|
||||
dest->net = get_net(sock_net(NETLINK_CB(request_skb).sk));
|
||||
dest->portid = portid;
|
||||
skb_queue_head_init(&dest->q);
|
||||
|
||||
@@ -1161,14 +1159,15 @@ int audit_list_rules_send(struct sk_buff *request_skb, int seq)
|
||||
audit_list_rules(portid, seq, &dest->q);
|
||||
mutex_unlock(&audit_filter_mutex);
|
||||
|
||||
tsk = kthread_run(audit_send_list, dest, "audit_send_list");
|
||||
tsk = kthread_run(audit_send_list_thread, dest, "audit_send_list");
|
||||
if (IS_ERR(tsk)) {
|
||||
skb_queue_purge(&dest->q);
|
||||
put_net(dest->net);
|
||||
kfree(dest);
|
||||
err = PTR_ERR(tsk);
|
||||
return PTR_ERR(tsk);
|
||||
}
|
||||
|
||||
return err;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int audit_comparator(u32 left, u32 op, u32 right)
|
||||
|
||||
@@ -2246,7 +2246,8 @@ static void __ftrace_trace_stack(struct ring_buffer *buffer,
|
||||
size *= sizeof(unsigned long);
|
||||
|
||||
event = trace_buffer_lock_reserve(buffer, TRACE_STACK,
|
||||
sizeof(*entry) + size, flags, pc);
|
||||
(sizeof(*entry) - sizeof(entry->caller)) + size,
|
||||
flags, pc);
|
||||
if (!event)
|
||||
goto out;
|
||||
entry = ring_buffer_event_data(event);
|
||||
|
||||
@@ -132,7 +132,7 @@ static int __init init_zero_pfn(void)
|
||||
zero_pfn = page_to_pfn(ZERO_PAGE(0));
|
||||
return 0;
|
||||
}
|
||||
core_initcall(init_zero_pfn);
|
||||
early_initcall(init_zero_pfn);
|
||||
|
||||
|
||||
#if defined(SPLIT_RSS_COUNTING)
|
||||
|
||||
@@ -1575,8 +1575,8 @@ static int atalk_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
|
||||
struct sk_buff *skb;
|
||||
struct net_device *dev;
|
||||
struct ddpehdr *ddp;
|
||||
int size;
|
||||
struct atalk_route *rt;
|
||||
int size, hard_header_len;
|
||||
struct atalk_route *rt, *rt_lo = NULL;
|
||||
int err;
|
||||
|
||||
if (flags & ~(MSG_DONTWAIT|MSG_CMSG_COMPAT))
|
||||
@@ -1639,7 +1639,22 @@ static int atalk_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
|
||||
SOCK_DEBUG(sk, "SK %p: Size needed %d, device %s\n",
|
||||
sk, size, dev->name);
|
||||
|
||||
size += dev->hard_header_len;
|
||||
hard_header_len = dev->hard_header_len;
|
||||
/* Leave room for loopback hardware header if necessary */
|
||||
if (usat->sat_addr.s_node == ATADDR_BCAST &&
|
||||
(dev->flags & IFF_LOOPBACK || !(rt->flags & RTF_GATEWAY))) {
|
||||
struct atalk_addr at_lo;
|
||||
|
||||
at_lo.s_node = 0;
|
||||
at_lo.s_net = 0;
|
||||
|
||||
rt_lo = atrtr_find(&at_lo);
|
||||
|
||||
if (rt_lo && rt_lo->dev->hard_header_len > hard_header_len)
|
||||
hard_header_len = rt_lo->dev->hard_header_len;
|
||||
}
|
||||
|
||||
size += hard_header_len;
|
||||
release_sock(sk);
|
||||
skb = sock_alloc_send_skb(sk, size, (flags & MSG_DONTWAIT), &err);
|
||||
lock_sock(sk);
|
||||
@@ -1647,7 +1662,7 @@ static int atalk_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
|
||||
goto out;
|
||||
|
||||
skb_reserve(skb, ddp_dl->header_length);
|
||||
skb_reserve(skb, dev->hard_header_len);
|
||||
skb_reserve(skb, hard_header_len);
|
||||
skb->dev = dev;
|
||||
|
||||
SOCK_DEBUG(sk, "SK %p: Begin build.\n", sk);
|
||||
@@ -1698,18 +1713,12 @@ static int atalk_sendmsg(struct socket *sock, struct msghdr *msg, size_t len)
|
||||
/* loop back */
|
||||
skb_orphan(skb);
|
||||
if (ddp->deh_dnode == ATADDR_BCAST) {
|
||||
struct atalk_addr at_lo;
|
||||
|
||||
at_lo.s_node = 0;
|
||||
at_lo.s_net = 0;
|
||||
|
||||
rt = atrtr_find(&at_lo);
|
||||
if (!rt) {
|
||||
if (!rt_lo) {
|
||||
kfree_skb(skb);
|
||||
err = -ENETUNREACH;
|
||||
goto out;
|
||||
}
|
||||
dev = rt->dev;
|
||||
dev = rt_lo->dev;
|
||||
skb->dev = dev;
|
||||
}
|
||||
ddp_dl->request(ddp_dl, skb, dev->dev_addr);
|
||||
|
||||
@@ -2130,10 +2130,7 @@ static u32 __bpf_skb_min_len(const struct sk_buff *skb)
|
||||
return min_len;
|
||||
}
|
||||
|
||||
static u32 __bpf_skb_max_len(const struct sk_buff *skb)
|
||||
{
|
||||
return skb->dev->mtu + skb->dev->hard_header_len;
|
||||
}
|
||||
#define BPF_SKB_MAX_LEN SKB_MAX_ALLOC
|
||||
|
||||
static int bpf_skb_grow_rcsum(struct sk_buff *skb, unsigned int new_len)
|
||||
{
|
||||
@@ -2154,7 +2151,7 @@ static int bpf_skb_trim_rcsum(struct sk_buff *skb, unsigned int new_len)
|
||||
BPF_CALL_3(bpf_skb_change_tail, struct sk_buff *, skb, u32, new_len,
|
||||
u64, flags)
|
||||
{
|
||||
u32 max_len = __bpf_skb_max_len(skb);
|
||||
u32 max_len = BPF_SKB_MAX_LEN;
|
||||
u32 min_len = __bpf_skb_min_len(skb);
|
||||
int ret;
|
||||
|
||||
|
||||
@@ -317,6 +317,11 @@ static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
|
||||
if (!ipv6_unicast_destination(skb))
|
||||
return 0; /* discard, don't send a reset here */
|
||||
|
||||
if (ipv6_addr_v4mapped(&ipv6_hdr(skb)->saddr)) {
|
||||
__IP6_INC_STATS(sock_net(sk), NULL, IPSTATS_MIB_INHDRERRORS);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (dccp_bad_service_code(sk, service)) {
|
||||
dcb->dccpd_reset_code = DCCP_RESET_CODE_BAD_SERVICE_CODE;
|
||||
goto drop;
|
||||
|
||||
@@ -168,16 +168,6 @@ int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt
|
||||
if (ipv6_addr_is_multicast(&hdr->saddr))
|
||||
goto err;
|
||||
|
||||
/* While RFC4291 is not explicit about v4mapped addresses
|
||||
* in IPv6 headers, it seems clear linux dual-stack
|
||||
* model can not deal properly with these.
|
||||
* Security models could be fooled by ::ffff:127.0.0.1 for example.
|
||||
*
|
||||
* https://tools.ietf.org/html/draft-itojun-v6ops-v4mapped-harmful-02
|
||||
*/
|
||||
if (ipv6_addr_v4mapped(&hdr->saddr))
|
||||
goto err;
|
||||
|
||||
skb->transport_header = skb->network_header + sizeof(*hdr);
|
||||
IP6CB(skb)->nhoff = offsetof(struct ipv6hdr, nexthdr);
|
||||
|
||||
|
||||
@@ -992,6 +992,11 @@ static int tcp_v6_conn_request(struct sock *sk, struct sk_buff *skb)
|
||||
if (!ipv6_unicast_destination(skb))
|
||||
goto drop;
|
||||
|
||||
if (ipv6_addr_v4mapped(&ipv6_hdr(skb)->saddr)) {
|
||||
__IP6_INC_STATS(sock_net(sk), NULL, IPSTATS_MIB_INHDRERRORS);
|
||||
return 0;
|
||||
}
|
||||
|
||||
return tcp_conn_request(&tcp6_request_sock_ops,
|
||||
&tcp_request_sock_ipv6_ops, sk, skb);
|
||||
|
||||
|
||||
@@ -1705,11 +1705,14 @@ static int
|
||||
svcauth_gss_release(struct svc_rqst *rqstp)
|
||||
{
|
||||
struct gss_svc_data *gsd = (struct gss_svc_data *)rqstp->rq_auth_data;
|
||||
struct rpc_gss_wire_cred *gc = &gsd->clcred;
|
||||
struct rpc_gss_wire_cred *gc;
|
||||
struct xdr_buf *resbuf = &rqstp->rq_res;
|
||||
int stat = -EINVAL;
|
||||
struct sunrpc_net *sn = net_generic(SVC_NET(rqstp), sunrpc_net_id);
|
||||
|
||||
if (!gsd)
|
||||
goto out;
|
||||
gc = &gsd->clcred;
|
||||
if (gc->gc_proc != RPC_GSS_PROC_DATA)
|
||||
goto out;
|
||||
/* Release can be called twice, but we only wrap once. */
|
||||
@@ -1750,10 +1753,10 @@ out_err:
|
||||
if (rqstp->rq_cred.cr_group_info)
|
||||
put_group_info(rqstp->rq_cred.cr_group_info);
|
||||
rqstp->rq_cred.cr_group_info = NULL;
|
||||
if (gsd->rsci)
|
||||
if (gsd && gsd->rsci) {
|
||||
cache_put(&gsd->rsci->h, sn->rsc_cache);
|
||||
gsd->rsci = NULL;
|
||||
|
||||
gsd->rsci = NULL;
|
||||
}
|
||||
return stat;
|
||||
}
|
||||
|
||||
|
||||
@@ -650,6 +650,7 @@ struct sock *__vsock_create(struct net *net,
|
||||
vsk->trusted = psk->trusted;
|
||||
vsk->owner = get_cred(psk->owner);
|
||||
vsk->connect_timeout = psk->connect_timeout;
|
||||
security_sk_clone(parent, sk);
|
||||
} else {
|
||||
vsk->trusted = ns_capable_noaudit(&init_user_ns, CAP_NET_ADMIN);
|
||||
vsk->owner = get_current_cred();
|
||||
|
||||
@@ -4304,6 +4304,7 @@ static void alc_update_headset_jack_cb(struct hda_codec *codec,
|
||||
struct alc_spec *spec = codec->spec;
|
||||
spec->current_headset_type = ALC_HEADSET_TYPE_UNKNOWN;
|
||||
snd_hda_gen_hp_automute(codec, jack);
|
||||
alc_update_headset_mode(codec);
|
||||
}
|
||||
|
||||
static void alc_probe_headset_mode(struct hda_codec *codec)
|
||||
|
||||
@@ -341,9 +341,9 @@ static bool rt5640_readable_register(struct device *dev, unsigned int reg)
|
||||
}
|
||||
|
||||
static const DECLARE_TLV_DB_SCALE(out_vol_tlv, -4650, 150, 0);
|
||||
static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -65625, 375, 0);
|
||||
static const DECLARE_TLV_DB_MINMAX(dac_vol_tlv, -6562, 0);
|
||||
static const DECLARE_TLV_DB_SCALE(in_vol_tlv, -3450, 150, 0);
|
||||
static const DECLARE_TLV_DB_SCALE(adc_vol_tlv, -17625, 375, 0);
|
||||
static const DECLARE_TLV_DB_MINMAX(adc_vol_tlv, -1762, 3000);
|
||||
static const DECLARE_TLV_DB_SCALE(adc_bst_tlv, 0, 1200, 0);
|
||||
|
||||
/* {0, +20, +24, +30, +35, +40, +44, +50, +52} dB */
|
||||
|
||||
@@ -287,9 +287,9 @@ static bool rt5651_readable_register(struct device *dev, unsigned int reg)
|
||||
}
|
||||
|
||||
static const DECLARE_TLV_DB_SCALE(out_vol_tlv, -4650, 150, 0);
|
||||
static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -65625, 375, 0);
|
||||
static const DECLARE_TLV_DB_MINMAX(dac_vol_tlv, -6562, 0);
|
||||
static const DECLARE_TLV_DB_SCALE(in_vol_tlv, -3450, 150, 0);
|
||||
static const DECLARE_TLV_DB_SCALE(adc_vol_tlv, -17625, 375, 0);
|
||||
static const DECLARE_TLV_DB_MINMAX(adc_vol_tlv, -1762, 3000);
|
||||
static const DECLARE_TLV_DB_SCALE(adc_bst_tlv, 0, 1200, 0);
|
||||
|
||||
/* {0, +20, +24, +30, +35, +40, +44, +50, +52} dB */
|
||||
|
||||
@@ -3389,12 +3389,17 @@ static int rt5659_set_dai_sysclk(struct snd_soc_dai *dai,
|
||||
struct snd_soc_codec *codec = dai->codec;
|
||||
struct rt5659_priv *rt5659 = snd_soc_codec_get_drvdata(codec);
|
||||
unsigned int reg_val = 0;
|
||||
int ret;
|
||||
|
||||
if (freq == rt5659->sysclk && clk_id == rt5659->sysclk_src)
|
||||
return 0;
|
||||
|
||||
switch (clk_id) {
|
||||
case RT5659_SCLK_S_MCLK:
|
||||
ret = clk_set_rate(rt5659->mclk, freq);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
reg_val |= RT5659_SCLK_SRC_MCLK;
|
||||
break;
|
||||
case RT5659_SCLK_S_PLL1:
|
||||
|
||||
@@ -75,7 +75,7 @@ static const struct reg_default sgtl5000_reg_defaults[] = {
|
||||
{ SGTL5000_DAP_EQ_BASS_BAND4, 0x002f },
|
||||
{ SGTL5000_DAP_MAIN_CHAN, 0x8000 },
|
||||
{ SGTL5000_DAP_MIX_CHAN, 0x0000 },
|
||||
{ SGTL5000_DAP_AVC_CTRL, 0x0510 },
|
||||
{ SGTL5000_DAP_AVC_CTRL, 0x5100 },
|
||||
{ SGTL5000_DAP_AVC_THRESHOLD, 0x1473 },
|
||||
{ SGTL5000_DAP_AVC_ATTACK, 0x0028 },
|
||||
{ SGTL5000_DAP_AVC_DECAY, 0x0050 },
|
||||
|
||||
@@ -1154,6 +1154,7 @@ bool snd_usb_get_sample_rate_quirk(struct snd_usb_audio *chip)
|
||||
case USB_ID(0x21B4, 0x0081): /* AudioQuest DragonFly */
|
||||
case USB_ID(0x2912, 0x30c8): /* Audioengine D1 */
|
||||
case USB_ID(0x413c, 0xa506): /* Dell AE515 sound bar */
|
||||
case USB_ID(0x046d, 0x084c): /* Logitech ConferenceCam Connect */
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user