Linux 3.10.45
Greg KH
maintainerI'm announcing the release of the 3.10.45 kernel.
All users of the 3.10 kernel series must upgrade.
The updated 3.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.10.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/mach-at91/sysirq_mask.c | 22 ++- arch/mips/kvm/kvm_mips.c | 2 arch/sparc/net/bpf_jit_comp.c | 8 - arch/x86/kvm/lapic.c | 62 +++++++--- crypto/crypto_user.c | 2 drivers/connector/cn_proc.c | 2 drivers/hv/hv_balloon.c | 29 ++++- drivers/iio/adc/at91_adc.c | 16 +- drivers/iio/adc/max1363.c | 16 +- drivers/iio/magnetometer/ak8975.c | 9 - drivers/net/ethernet/mellanox/mlx4/main.c | 170 +++++++++++++++++------------- drivers/net/ethernet/mellanox/mlx4/mlx4.h | 1 drivers/net/macvlan.c | 1 drivers/net/team/team.c | 7 + drivers/net/usb/qmi_wwan.c | 7 + drivers/net/vxlan.c | 4 drivers/rtc/rtc-at91rm9200.c | 16 ++ drivers/scsi/scsi_netlink.c | 2 drivers/staging/iio/light/tsl2x7x_core.c | 8 + drivers/target/iscsi/iscsi_target_auth.c | 10 + drivers/usb/class/cdc-acm.c | 96 ++++++++++------ drivers/usb/class/cdc-acm.h | 2 include/linux/if_team.h | 1 include/linux/netlink.h | 14 +- include/linux/sock_diag.h | 2 include/net/inetpeer.h | 9 - include/net/sock.h | 5 include/sound/core.h | 2 include/uapi/sound/compress_offload.h | 2 kernel/audit.c | 4 kernel/time/tick-sched.c | 4 lib/lzo/lzo1x_decompress_safe.c | 62 +++++++--- lib/nlattr.c | 4 net/can/gw.c | 4 net/core/dev.c | 5 net/core/rtnetlink.c | 43 +++++-- net/core/sock.c | 49 ++++++++ net/core/sock_diag.c | 4 net/dcb/dcbnl.c | 2 net/decnet/dn_dev.c | 4 net/decnet/dn_fib.c | 4 net/decnet/netfilter/dn_rtmsg.c | 2 net/ipv4/datagram.c | 20 ++- net/ipv4/ipip.c | 5 net/ipv4/tcp_input.c | 11 - net/ipv6/ip6_tunnel.c | 1 net/ipv6/output_core.c | 11 - net/ipv6/sit.c | 5 net/mac80211/iface.c | 1 net/netfilter/nfnetlink.c | 2 net/netlink/af_netlink.c | 80 +++++++++++++- net/netlink/genetlink.c | 2 net/packet/diag.c | 7 + net/phonet/pn_netlink.c | 8 - net/sched/act_api.c | 2 net/sched/cls_api.c | 2 net/sched/sch_api.c | 6 - net/sctp/associola.c | 2 net/tipc/netlink.c | 2 net/xfrm/xfrm_user.c | 2 security/integrity/evm/evm_main.c | 12 +- security/integrity/ima/ima_crypto.c | 32 +++++ sound/core/control.c | 78 +++++++++---- sound/core/init.c | 1 sound/pci/hda/patch_realtek.c | 10 + sound/soc/codecs/max98090.c | 3 67 files changed, 701 insertions(+), 324 deletions(-)
Alexei Starovoitov (2):
net: filter: fix typo in sparc BPF JIT
net: filter: fix sparc32 typo
Bjørn Mork (1):
net: qmi_wwan: add Olivetti Olicard modems
Boris BREZILLON (2):
rtc: rtc-at91rm9200: fix infinite wait for ACKUPD irq
ARM: at91: fix at91_sysirq_mask_rtc for sam9x5 SoCs
Cong Wang (1):
vxlan: use dev->needed_headroom instead of dev->hard_header_len
Dan Carpenter (1):
iio: adc: at91: signedness bug in at91_adc_get_trigger_value_by_name()
David Henningsson (1):
ALSA: hda - Add quirk for external mic on Lifebook U904
Dmitry Kasatkin (1):
ima: introduce ima_kernel_read()
Dmitry Popov (1):
ipip, sit: fix ipv4_{update_pmtu,redirect} calls
Eric Dumazet (3):
net: fix inet_getid() and ipv6_select_ident() bugs
net: force a list_del() in unregister_netdevice_many()
ipv4: fix a race in ip4_datagram_release_cb()
Eric W. Biederman (6):
netlink: Rename netlink_capable netlink_allowed
net: Move the permission check in sock_diag_put_filterinfo to packet_diag_dump
net: Add variants of capable for use on on sockets
net: Add variants of capable for use on netlink messages
net: Use netlink_ns_capable to verify the permisions of netlink messages
netlink: Only check file credentials for implicit destinations
Greg Kroah-Hartman (2):
lzo: properly check for overruns
Linux 3.10.45
James Hogan (1):
MIPS: KVM: Allocate at least 16KB for exception handlers
Jiri Pirko (1):
team: fix mtu setting
Johan Hovold (7):
USB: cdc-acm: fix write and suspend race
USB: cdc-acm: fix write and resume race
USB: cdc-acm: fix broken runtime suspend
USB: cdc-acm: fix runtime PM for control messages
USB: cdc-acm: fix shutdown and suspend race
USB: cdc-acm: fix I/O after failed open
USB: cdc-acm: fix runtime PM imbalance at shutdown
Jonathan Cameron (1):
iio:adc:max1363 incorrect resolutions for max11604, max11605, max11610 and max11611.
K. Y. Srinivasan (1):
Drivers: hv: balloon: Ensure pressure reports are posted regularly
Kailang Yang (1):
ALSA: hda/realtek - Add support of ALC891 codec
Lars-Peter Clausen (5):
ALSA: control: Protect user controls against concurrent access
ALSA: control: Fix replacing user controls
ALSA: control: Don't access controls outside of protected regions
ALSA: control: Handle numid overflow
ALSA: control: Make sure that id->index does not overflow
Liam Girdwood (1):
ASoC: max98090: Fix reset at resume time
Mario Schuknecht (1):
staging: iio: tsl2x7x_core: fix proximity treshold
Michal Schmidt (2):
netlink: rate-limit leftover bytes warning and print process name
rtnetlink: fix userspace API breakage for iproute2 < v3.9.0
Mimi Zohar (1):
evm: prohibit userspace writing 'security.evm' HMAC value
Nicholas Bellinger (1):
iscsi-target: Reject mutual authentication with reflected CHAP_C
Paolo Bonzini (1):
KVM: lapic: sync highest ISR to hardware apic on EOI
Peter Meerwald (1):
iio: Fix endianness issue in ak8975_read_axis()
Thomas Gleixner (1):
nohz: Fix another inconsistency between CONFIG_NO_HZ=n and nohz=off
Tom Gundersen (1):
net: tunnels - enable module autoloading
Wang, Xiaoming (1):
ALSA: compress: Cancel the optimization of compiler and fix the size of struct for all platform.
Wei Yang (2):
net/mlx4_core: pass pci_device_id.driver_data to __mlx4_init_one during reset net/mlx4_core: Preserve pci_dev_data after __mlx4_remove_one()
Xufeng Zhang (1):
sctp: Fix sk_ack_backlog wrap-around problem
Yuchung Cheng (1):
tcp: fix cwnd undo on DSACK in F-RTO
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 10 -SUBLEVEL = 44 +SUBLEVEL = 45 EXTRAVERSION = NAME = TOSSUG Baby Fish
arch/arm/mach-at91/sysirq_mask.c +13 -9
@@ -25,24 +25,28 @@#include "generic.h" -#define AT91_RTC_IDR 0x24/* Interrupt Disable Register */ -#define AT91_RTC_IMR 0x28/* Interrupt Mask Register */ +#define AT91_RTC_IDR 0x24/* Interrupt Disable Register */ +#define AT91_RTC_IMR 0x28/* Interrupt Mask Register */ +#define AT91_RTC_IRQ_MASK 0x1f/* Available IRQs mask */ void __init at91_sysirq_mask_rtc (u32 rtc_base) {void __iomem *base; -u32 mask; base =ioremap (rtc_base,64 );if (!base)return ; - mask =readl_relaxed (base +AT91_RTC_IMR ); -if (mask) { -pr_info ("AT91: Disabling rtc irq\n" ); -writel_relaxed (mask, base +AT91_RTC_IDR ); - (void )readl_relaxed (base +AT91_RTC_IMR );/* flush */ - } +/* +* sam9x5 SoCs have the following errata: +* "RTC: Interrupt Mask Register cannot be used +* Interrupt Mask Register read always returns 0." +* +* Hence we're not relying on IMR values to disable +* interrupts. +*/ +writel_relaxed (AT91_RTC_IRQ_MASK , base +AT91_RTC_IDR ); + (void )readl_relaxed (base +AT91_RTC_IMR );/* flush */ iounmap (base); }
arch/mips/kvm/kvm_mips.c +1 -1
@@ -299,7 +299,7 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id)if (cpu_has_veic || cpu_has_vint) { size =0x200 +VECTORSPACING *64 ; }else { - size =0x200 ; + size =0x4000 ; }/* Save Linux EBASE */
arch/sparc/net/bpf_jit_comp.c +4 -4
@@ -83,9 +83,9 @@ static void bpf_flush_icache(void *start_, void *end_)#define BNE (F2(0, 2) | CONDNE)#ifdef CONFIG_SPARC64 -#define BNE_PTR (F2(0, 1) | CONDNE | (2 << 20)) +#define BE_PTR (F2(0, 1) | CONDE | (2 << 20))#else -#define BNE_PTR BNE +#define BE_PTR BE#endif #define SETHI (K ,REG ) \
@@ -600,7 +600,7 @@ void bpf_jit_compile(struct sk_filter *fp)case BPF_S_ANC_IFINDEX :emit_skb_loadptr (dev, r_A);emit_cmpi (r_A,0 ); -emit_branch (BNE_PTR , cleanup_addr +4 ); +emit_branch (BE_PTR , cleanup_addr +4 );emit_nop (); emit_load32(r_A, struct net_device, ifindex, r_A);break ;
@@ -613,7 +613,7 @@ void bpf_jit_compile(struct sk_filter *fp)case BPF_S_ANC_HATYPE :emit_skb_loadptr (dev, r_A);emit_cmpi (r_A,0 ); -emit_branch (BNE_PTR , cleanup_addr +4 ); +emit_branch (BE_PTR , cleanup_addr +4 );emit_nop (); emit_load16(r_A, struct net_device, type, r_A);break ;
arch/x86/kvm/lapic.c +43 -19
89 lines not on this page · raw message
crypto/crypto_user.c +1 -1
@@ -466,7 +466,7 @@ static int crypto_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) type -=CRYPTO_MSG_BASE ; link = &crypto_dispatch[type]; -if (!capable (CAP_NET_ADMIN )) +if (!netlink_capable (skb,CAP_NET_ADMIN ))return -EPERM ; if ((type == (CRYPTO_MSG_GETALG - CRYPTO_MSG_BASE) &&
drivers/connector/cn_proc.c +1 -1
@@ -369,7 +369,7 @@ static void cn_proc_mcast_ctl(struct cn_msg *msg,return ;/* Can only change if privileged. */ -if (!capable (CAP_NET_ADMIN )) { +if (!__netlink_ns_capable (nsp, &init_user_ns,CAP_NET_ADMIN )) { err =EPERM ; goto out; }
drivers/hv/hv_balloon.c +26 -3
@@ -19,6 +19,7 @@#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt#include <linux/kernel.h> +#include <linux/jiffies.h> #include <linux/mman.h> #include <linux/delay.h> #include <linux/init.h>
@@ -459,6 +460,11 @@ static bool do_hot_add;*/ static uint pressure_report_delay =45 ; +/* +* The last time we posted a pressure report to host. +*/ +static unsigned long last_post_time; +module_param (hot_add, bool, (S_IRUGO |S_IWUSR ));MODULE_PARM_DESC (hot_add,"If set attempt memory hot_add" );
@@ -542,6 +548,7 @@ struct hv_dynmem_device {static struct hv_dynmem_device dm_device; +static void post_status (struct hv_dynmem_device *dm);#ifdef CONFIG_MEMORY_HOTPLUG static void hv_bring_pgs_online (unsigned long start_pfn,unsigned long size)
@@ -612,7 +619,7 @@ static void hv_mem_hot_add(unsigned long start, unsigned long size,* have not been "onlined" within the allowed time. */ wait_for_completion_timeout (&dm_device.ol_waitevent,5 *HZ ); - +post_status (&dm_device); }return ;
@@ -951,11 +958,17 @@ static void post_status(struct hv_dynmem_device *dm) {struct dm_status status;struct sysinfo val; +unsigned long now = jiffies; +unsigned long last_post = last_post_time;if (pressure_report_delay >0 ) { --pressure_report_delay;return ; } + +if (!time_after (now, (last_post_time +HZ ))) +return ; +si_meminfo (&val);memset (&status,0 ,sizeof (struct dm_status )); status.hdr.type =DM_STATUS_REPORT ;
@@ -983,6 +996,14 @@ static void post_status(struct hv_dynmem_device *dm)if (status.hdr.trans_id !=atomic_read (&trans_id))return ; +/* +* If the last post time that we sampled has changed, +* we have raced, don't post the status. +*/ +if (last_post != last_post_time) +return ; + + last_post_time = jiffies; vmbus_sendpacket(dm->dev->channel, &status, sizeof(struct dm_status), (unsigned long)NULL,
@@ -1117,7 +1138,7 @@ static void balloon_up(struct work_struct *dummy)if (ret == -EAGAIN )msleep (20 ); - +post_status (&dm_device); }while (ret == -EAGAIN );if (ret) {
@@ -1144,8 +1165,10 @@ static void balloon_down(struct hv_dynmem_device *dm,struct dm_unballoon_response resp;int i; -for (i =0 ; i < range_count; i++) +for (i =0 ; i < range_count; i++) {free_balloon_pages (dm, &range_array[i]); +post_status (&dm_device); + }if (req->more_pages ==1 )return ;
drivers/iio/adc/at91_adc.c +8 -8
@@ -161,12 +161,11 @@ static int at91_adc_channel_init(struct iio_dev *idev)return idev->num_channels; } -static u8 at91_adc_get_trigger_value_by_name (struct iio_dev *idev, +static int at91_adc_get_trigger_value_by_name (struct iio_dev *idev,struct at91_adc_trigger *triggers,const char *trigger_name) {struct at91_adc_state *st =iio_priv (idev); -u8 value =0 ;int i;for (i =0 ; i < st->trigger_number; i++) {
@@ -179,15 +178,16 @@ static u8 at91_adc_get_trigger_value_by_name(struct iio_dev *idev,return -ENOMEM ;if (strcmp (trigger_name, name) ==0 ) { - value = triggers[i].value;kfree (name); -break ; +if (triggers[i].value ==0 ) +return -EINVAL ; +return triggers[i].value; }kfree (name); } -return value; +return -EINVAL ; }static int at91_adc_configure_trigger (struct iio_trigger *trig,bool state)
@@ -197,14 +197,14 @@ static int at91_adc_configure_trigger(struct iio_trigger *trig, bool state)struct iio_buffer *buffer = idev->buffer;struct at91_adc_reg_desc *reg = st->registers;u32 status =at91_adc_readl (st, reg->trigger_register); -u8 value; +int value;u8 bit; value =at91_adc_get_trigger_value_by_name (idev, st->trigger_list, idev->trig->name); -if (value ==0 ) -return -EINVAL ; +if (value <0 ) +return value;if (state) { st->buffer =kmalloc (idev->scan_bytes,GFP_KERNEL );
drivers/iio/adc/max1363.c +8 -8
@@ -1214,8 +1214,8 @@ static const struct max1363_chip_info max1363_chip_info_tbl[] = { .num_modes = ARRAY_SIZE(max1238_mode_list), .default_mode = s0to11, .info = &max1238_info, - .channels = max1238_channels, - .num_channels = ARRAY_SIZE(max1238_channels), + .channels = max1038_channels, + .num_channels = ARRAY_SIZE(max1038_channels), }, [max11605] = { .bits = 8,
@@ -1224,8 +1224,8 @@ static const struct max1363_chip_info max1363_chip_info_tbl[] = { .num_modes = ARRAY_SIZE(max1238_mode_list), .default_mode = s0to11, .info = &max1238_info, - .channels = max1238_channels, - .num_channels = ARRAY_SIZE(max1238_channels), + .channels = max1038_channels, + .num_channels = ARRAY_SIZE(max1038_channels), }, [max11606] = { .bits = 10,
@@ -1274,8 +1274,8 @@ static const struct max1363_chip_info max1363_chip_info_tbl[] = { .num_modes = ARRAY_SIZE(max1238_mode_list), .default_mode = s0to11, .info = &max1238_info, - .channels = max1238_channels, - .num_channels = ARRAY_SIZE(max1238_channels), + .channels = max1138_channels, + .num_channels = ARRAY_SIZE(max1138_channels), }, [max11611] = { .bits = 10,
@@ -1284,8 +1284,8 @@ static const struct max1363_chip_info max1363_chip_info_tbl[] = { .num_modes = ARRAY_SIZE(max1238_mode_list), .default_mode = s0to11, .info = &max1238_info, - .channels = max1238_channels, - .num_channels = ARRAY_SIZE(max1238_channels), + .channels = max1138_channels, + .num_channels = ARRAY_SIZE(max1138_channels), }, [max11612] = { .bits = 12,
drivers/iio/magnetometer/ak8975.c +1 -8
@@ -276,8 +276,6 @@ static int ak8975_read_axis(struct iio_dev *indio_dev, int index, int *val) {struct ak8975_data *data =iio_priv (indio_dev);struct i2c_client *client = data->client; -u16 meas_reg; -s16 raw;int ret;mutex_lock (&data->lock);
@@ -322,16 +320,11 @@ static int ak8975_read_axis(struct iio_dev *indio_dev, int index, int *val)dev_err (&client->dev,"Read axis data fails\n" ); goto exit; } - meas_reg = ret;mutex_unlock (&data->lock); -/* Endian conversion of the measured values. */ - raw = (s16) (le16_to_cpu (meas_reg)); -/* Clamp to valid range. */ - raw =clamp_t (s16, raw,-4096 ,4095 ); - *val = raw; + *val =clamp_t (s16, ret,-4096 ,4095 );return IIO_VAL_INT ; exit:
drivers/net/ethernet/mellanox/mlx4/main.c +97 -73
223 lines not on this page · raw message
drivers/net/ethernet/mellanox/mlx4/mlx4.h +1 -0
@@ -743,6 +743,7 @@ struct mlx4_priv {spinlock_t ctx_lock;int pci_dev_data; +int removed;struct list_head pgdir_list;struct mutex pgdir_mutex;
drivers/net/macvlan.c +0 -1
@@ -961,7 +961,6 @@ static int macvlan_device_event(struct notifier_block *unused,list_for_each_entry_safe (vlan, next, &port->vlans, list) vlan->dev->rtnl_link_ops->dellink (vlan->dev, &list_kill);unregister_netdevice_many (&list_kill); -list_del (&list_kill);break ;case NETDEV_PRE_TYPE_CHANGE :/* Forbid underlaying device to change its type. */
drivers/net/team/team.c +6 -1
@@ -1542,6 +1542,7 @@ static int team_change_mtu(struct net_device *dev, int new_mtu)* to traverse list in reverse under rcu_read_lock */ mutex_lock (&team->lock); + team->port_mtu_change_allowed = true;list_for_each_entry (port, &team->port_list, list) { err =dev_set_mtu (port->dev, new_mtu);if (err) {
@@ -1550,6 +1551,7 @@ static int team_change_mtu(struct net_device *dev, int new_mtu) goto unwind; } } + team->port_mtu_change_allowed = false;mutex_unlock (&team->lock); dev->mtu = new_mtu;
@@ -1559,6 +1561,7 @@ static int team_change_mtu(struct net_device *dev, int new_mtu) unwind:list_for_each_entry_continue_reverse (port, &team->port_list, list)dev_set_mtu (port->dev, dev->mtu); + team->port_mtu_change_allowed = false;mutex_unlock (&team->lock);return err;
@@ -2678,7 +2681,9 @@ static int team_device_event(struct notifier_block *unused,break ;case NETDEV_CHANGEMTU :/* Forbid to change mtu of underlaying device */ -return NOTIFY_BAD ; +if (!port->team->port_mtu_change_allowed) +return NOTIFY_BAD ; +break ;case NETDEV_PRE_TYPE_CHANGE :/* Forbid to change type of underlaying device */ return NOTIFY_BAD ;
drivers/net/usb/qmi_wwan.c +6 -1
@@ -739,7 +739,12 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x2357, 0x9000, 4)}, /* TP-LINK MA260 */ {QMI_FIXED_INTF(0x1bc7, 0x1200, 5)}, /* Telit LE920 */ {QMI_FIXED_INTF(0x1bc7, 0x1201, 2)}, /* Telit LE920 */ - {QMI_FIXED_INTF(0x0b3c, 0xc005, 6)}, /* Olivetti Olicard 200 */ + {QMI_FIXED_INTF(0x0b3c, 0xc000, 4)}, /* Olivetti Olicard 100 */ + {QMI_FIXED_INTF(0x0b3c, 0xc001, 4)}, /* Olivetti Olicard 120 */ + {QMI_FIXED_INTF(0x0b3c, 0xc002, 4)}, /* Olivetti Olicard 140 */ + {QMI_FIXED_INTF(0x0b3c, 0xc004, 6)}, /* Olivetti Olicard 155 */ + {QMI_FIXED_INTF(0x0b3c, 0xc005, 6)}, /* Olivetti Olicard 200 */ + {QMI_FIXED_INTF(0x0b3c, 0xc00a, 6)}, /* Olivetti Olicard 160 */ {QMI_FIXED_INTF(0x0b3c, 0xc00b, 4)}, /* Olivetti Olicard 500 */ {QMI_FIXED_INTF(0x1e2d, 0x0060, 4)}, /* Cinterion PLxx */ {QMI_FIXED_INTF(0x1e2d, 0x0053, 4)}, /* Cinterion PHxx,PXxx */
drivers/net/vxlan.c +2 -2
@@ -1314,7 +1314,7 @@ static void vxlan_setup(struct net_device *dev)eth_hw_addr_random (dev);ether_setup (dev); - dev->hard_header_len =ETH_HLEN +VXLAN_HEADROOM ; + dev->needed_headroom =ETH_HLEN +VXLAN_HEADROOM ; dev->netdev_ops = &vxlan_netdev_ops; dev->destructor = vxlan_free;
@@ -1454,7 +1454,7 @@ static int vxlan_newlink(struct net *net, struct net_device *dev, dev->mtu = lowerdev->mtu -VXLAN_HEADROOM ;/* update header length based on lower device */ - dev->hard_header_len = lowerdev->hard_header_len + + dev->needed_headroom = lowerdev->hard_header_len +VXLAN_HEADROOM ; }
drivers/rtc/rtc-at91rm9200.c +14 -2
@@ -49,6 +49,7 @@ struct at91_rtc_config {static const struct at91_rtc_config *at91_rtc_config;static DECLARE_COMPLETION (at91_rtc_updated); +static DECLARE_COMPLETION (at91_rtc_upd_rdy);static unsigned int at91_alarm_year =AT91_RTC_EPOCH ;static void __iomem *at91_rtc_regs;static int irq;
@@ -162,6 +163,8 @@ static int at91_rtc_settime(struct device *dev, struct rtc_time *tm)1900 + tm->tm_year, tm->tm_mon, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec); +wait_for_completion (&at91_rtc_upd_rdy); +/* Stop Time/Calendar from counting */ cr =at91_rtc_read (AT91_RTC_CR );at91_rtc_write (AT91_RTC_CR , cr |AT91_RTC_UPDCAL |AT91_RTC_UPDTIM );
@@ -184,7 +187,9 @@ static int at91_rtc_settime(struct device *dev, struct rtc_time *tm)/* Restart Time/Calendar */ cr =at91_rtc_read (AT91_RTC_CR ); +at91_rtc_write (AT91_RTC_SCCR ,AT91_RTC_SECEV );at91_rtc_write (AT91_RTC_CR , cr & ~(AT91_RTC_UPDCAL |AT91_RTC_UPDTIM )); +at91_rtc_write_ier (AT91_RTC_SECEV );return 0 ; }
@@ -291,8 +296,10 @@ static irqreturn_t at91_rtc_interrupt(int irq, void *dev_id)if (rtsr) {/* this interrupt is shared! Is it ours? */ if (rtsr &AT91_RTC_ALARM ) events |= (RTC_AF |RTC_IRQF ); -if (rtsr &AT91_RTC_SECEV ) - events |= (RTC_UF |RTC_IRQF ); +if (rtsr &AT91_RTC_SECEV ) { +complete (&at91_rtc_upd_rdy); +at91_rtc_write_idr (AT91_RTC_SECEV ); + }if (rtsr &AT91_RTC_ACKUPD )complete (&at91_rtc_updated);
@@ -415,6 +422,11 @@ static int __init at91_rtc_probe(struct platform_device *pdev) }platform_set_drvdata (pdev, rtc); +/* enable SECEV interrupt in order to initialize at91_rtc_upd_rdy +* completion. +*/ +at91_rtc_write_ier (AT91_RTC_SECEV ); +dev_info (&pdev->dev,"AT91 Real Time Clock driver.\n" );return 0 ;
drivers/scsi/scsi_netlink.c +1 -1
@@ -77,7 +77,7 @@ scsi_nl_rcv_msg(struct sk_buff *skb) goto next_msg; } -if (!capable (CAP_SYS_ADMIN )) { +if (!netlink_capable (skb,CAP_SYS_ADMIN )) { err = -EPERM ; goto next_msg; }
drivers/staging/iio/light/tsl2x7x_core.c +6 -2
@@ -672,9 +672,13 @@ static int tsl2x7x_chip_on(struct iio_dev *indio_dev) chip->tsl2x7x_config[TSL2X7X_PRX_COUNT ] = chip->tsl2x7x_settings.prox_pulse_count; chip->tsl2x7x_config[TSL2X7X_PRX_MINTHRESHLO ] = - chip->tsl2x7x_settings.prox_thres_low; + (chip->tsl2x7x_settings.prox_thres_low) &0xFF ; + chip->tsl2x7x_config[TSL2X7X_PRX_MINTHRESHHI ] = + (chip->tsl2x7x_settings.prox_thres_low >>8 ) &0xFF ; chip->tsl2x7x_config[TSL2X7X_PRX_MAXTHRESHLO ] = - chip->tsl2x7x_settings.prox_thres_high; + (chip->tsl2x7x_settings.prox_thres_high) &0xFF ; + chip->tsl2x7x_config[TSL2X7X_PRX_MAXTHRESHHI ] = + (chip->tsl2x7x_settings.prox_thres_high >>8 ) &0xFF ;/* and make sure we're not already on */ if (chip->tsl2x7x_chip_status ==TSL2X7X_CHIP_WORKING ) {
drivers/target/iscsi/iscsi_target_auth.c +10 -0
@@ -316,6 +316,16 @@ static int chap_server_compute_md5( goto out; }/* +* During mutual authentication, the CHAP_C generated by the +* initiator must not match the original CHAP_C generated by +* the target. +*/ +if (!memcmp (challenge_binhex, chap->challenge,CHAP_CHALLENGE_LENGTH )) { +pr_err ("initiator CHAP_C matches target CHAP_C, failing" +" login attempt\n" ); + goto out; + } +/* * Generate CHAP_N and CHAP_R for mutual authentication. */ tfm =crypto_alloc_hash ("md5" ,0 ,CRYPTO_ALG_ASYNC );
drivers/usb/class/cdc-acm.c +57 -39
188 lines not on this page · raw message
drivers/usb/class/cdc-acm.h +1 -1
@@ -117,7 +117,7 @@ struct acm { unsigned int throttled:1; /* actually throttled */ unsigned int throttle_req:1; /* throttle requested */u8 bInterval; -struct acm_wb *delayed_wb;/* write queued for a device about to be woken */ +struct usb_anchor delayed;/* writes queued for a device about to be woken */ };#define CDC_DATA_INTERFACE_TYPE 0x0a
include/linux/if_team.h +1 -0
@@ -193,6 +193,7 @@ struct team {bool user_carrier_enabled;bool queue_override_enabled;struct list_head *qom_lists;/* array of queue override mapping lists */ +bool port_mtu_change_allowed;long mode_priv[TEAM_MODE_PRIV_LONGS ]; };
include/linux/netlink.h +11 -3
@@ -16,9 +16,10 @@ static inline struct nlmsghdr *nlmsg_hdr(const struct sk_buff *skb) }enum netlink_skb_flags { -NETLINK_SKB_MMAPED =0x1 ,/* Packet data is mmaped */ -NETLINK_SKB_TX =0x2 ,/* Packet was sent by userspace */ -NETLINK_SKB_DELIVERED =0x4 ,/* Packet was delivered */ +NETLINK_SKB_MMAPED =0x1 ,/* Packet data is mmaped */ +NETLINK_SKB_TX =0x2 ,/* Packet was sent by userspace */ +NETLINK_SKB_DELIVERED =0x4 ,/* Packet was delivered */ +NETLINK_SKB_DST =0x8 ,/* Dst set in sendto or sendmsg */ };struct netlink_skb_parms {
@@ -144,4 +145,11 @@ static inline int netlink_dump_start(struct sock *ssk, struct sk_buff *skb, return __netlink_dump_start(ssk, skb, nlh, control); } +bool __netlink_ns_capable (const struct netlink_skb_parms *nsp, +struct user_namespace *ns,int cap); +bool netlink_ns_capable (const struct sk_buff *skb, +struct user_namespace *ns,int cap); +bool netlink_capable (const struct sk_buff *skb,int cap); +bool netlink_net_capable (const struct sk_buff *skb,int cap); +#endif /* __LINUX_NETLINK_H */
include/linux/sock_diag.h +1 -1
@@ -23,7 +23,7 @@ int sock_diag_check_cookie(void *sk, __u32 *cookie);void sock_diag_save_cookie (void *sk,__u32 *cookie);int sock_diag_put_meminfo (struct sock *sk,struct sk_buff *skb,int attr); -int sock_diag_put_filterinfo (struct sock *sk, +int sock_diag_put_filterinfo (bool may_report_filterinfo,struct sock *sk,struct sk_buff *skb,int attrtype);#endif
include/net/inetpeer.h +1 -8
@@ -178,16 +178,9 @@ static inline void inet_peer_refcheck(const struct inet_peer *p)/* can be called with or without local BH being disabled */ static inline int inet_getid (struct inet_peer *p,int more) { -int old, new; more++;inet_peer_refcheck (p); -do { - old =atomic_read (&p->ip_id_count); - new = old + more; -if (!new) - new =1 ; - }while (atomic_cmpxchg (&p->ip_id_count, old, new) != old); -return new; +return atomic_add_return (more, &p->ip_id_count) - more; }#endif /* _NET_INETPEER_H */
include/net/sock.h +5 -0
@@ -2248,6 +2248,11 @@ extern void sock_enable_timestamp(struct sock *sk, int flag);extern int sock_get_timestamp (struct sock *,struct timeval __user *);extern int sock_get_timestampns (struct sock *,struct timespec __user *); +bool sk_ns_capable (const struct sock *sk, +struct user_namespace *user_ns,int cap); +bool sk_capable (const struct sock *sk,int cap); +bool sk_net_capable (const struct sock *sk,int cap); +/* * Enable debug/info messages */
include/sound/core.h +2 -0
@@ -120,6 +120,8 @@ struct snd_card {int user_ctl_count;/* count of all user controls */ struct list_head controls;/* all controls for this card */ struct list_head ctl_files;/* active control files */ +struct mutex user_ctl_lock;/* protects user controls against +concurrent access */ struct snd_info_entry *proc_root;/* root for soundcard specific files */ struct snd_info_entry *proc_id;/* the card id */
include/uapi/sound/compress_offload.h +1 -1
@@ -80,7 +80,7 @@ struct snd_compr_tstamp {struct snd_compr_avail {__u64 avail;struct snd_compr_tstamp tstamp; -}; +} __attribute__((packed));enum snd_compr_direction {SND_COMPRESS_PLAYBACK =0 ,
kernel/audit.c +2 -2
@@ -593,13 +593,13 @@ static int audit_netlink_ok(struct sk_buff *skb, u16 msg_type)case AUDIT_TTY_SET :case AUDIT_TRIM :case AUDIT_MAKE_EQUIV : -if (!capable (CAP_AUDIT_CONTROL )) +if (!netlink_capable (skb,CAP_AUDIT_CONTROL )) err = -EPERM ;break ;case AUDIT_USER : case AUDIT_FIRST_USER_MSG ... AUDIT_LAST_USER_MSG: case AUDIT_FIRST_USER_MSG2 ... AUDIT_LAST_USER_MSG2: -if (!capable (CAP_AUDIT_WRITE )) +if (!netlink_capable (skb,CAP_AUDIT_WRITE )) err = -EPERM ;break ;default :/* bad msg */
kernel/time/tick-sched.c +3 -1
@@ -720,8 +720,10 @@ static bool can_stop_idle_tick(int cpu, struct tick_sched *ts)return false; } -if (unlikely (ts->nohz_mode ==NOHZ_MODE_INACTIVE )) +if (unlikely (ts->nohz_mode ==NOHZ_MODE_INACTIVE )) { + ts->sleep_length = (ktime_t ) { .tv64 =NSEC_PER_SEC /HZ };return false; + }if (need_resched ())return false;
lib/lzo/lzo1x_decompress_safe.c +41 -21
144 lines not on this page · raw message
lib/nlattr.c +2 -2
@@ -201,8 +201,8 @@ int nla_parse(struct nlattr **tb, int maxtype, const struct nlattr *head, }if (unlikely (rem >0 )) -printk (KERN_WARNING "netlink: %d bytes leftover after parsing " -"attributes.\n" , rem); +pr_warn_ratelimited ("netlink: %d bytes leftover after parsing attributes in process `%s'.\n" , + rem, current->comm); err =0 ; errout:
net/can/gw.c +2 -2
@@ -784,7 +784,7 @@ static int cgw_create_job(struct sk_buff *skb, struct nlmsghdr *nlh)struct cgw_job *gwj;int err =0 ; -if (!capable (CAP_NET_ADMIN )) +if (!netlink_capable (skb,CAP_NET_ADMIN ))return -EPERM ;if (nlmsg_len (nlh) <sizeof (*r))
@@ -876,7 +876,7 @@ static int cgw_remove_job(struct sk_buff *skb, struct nlmsghdr *nlh)struct can_can_gw ccgw;int err =0 ; -if (!capable (CAP_NET_ADMIN )) +if (!netlink_capable (skb,CAP_NET_ADMIN ))return -EPERM ;if (nlmsg_len (nlh) <sizeof (*r))
net/core/dev.c +4 -1
@@ -5827,6 +5827,9 @@ EXPORT_SYMBOL(unregister_netdevice_queue);/** * unregister_netdevice_many - unregister many devices * @head: list of devices +* +* Note: As most callers use a stack allocated list_head, +* we force a list_del() to make sure stack wont be corrupted later. */ void unregister_netdevice_many (struct list_head *head) {
@@ -5836,6 +5839,7 @@ void unregister_netdevice_many(struct list_head *head)rollback_registered_many (head);list_for_each_entry (dev, head, unreg_list)net_set_todo (dev); +list_del (head); } }EXPORT_SYMBOL (unregister_netdevice_many);
@@ -6252,7 +6256,6 @@ static void __net_exit default_device_exit_batch(struct list_head *net_list) } }unregister_netdevice_many (&dev_kill_list); -list_del (&dev_kill_list);rtnl_unlock (); }
net/core/rtnetlink.c +29 -14
120 lines not on this page · raw message
net/core/sock.c +49 -0
55 lines not on this page · raw message
net/core/sock_diag.c +2 -2
@@ -49,7 +49,7 @@ int sock_diag_put_meminfo(struct sock *sk, struct sk_buff *skb, int attrtype) }EXPORT_SYMBOL_GPL (sock_diag_put_meminfo); -int sock_diag_put_filterinfo (struct sock *sk, +int sock_diag_put_filterinfo (bool may_report_filterinfo,struct sock *sk,struct sk_buff *skb,int attrtype) {struct nlattr *attr;
@@ -57,7 +57,7 @@ int sock_diag_put_filterinfo(struct sock *sk,unsigned int len;int err =0 ; -if (!ns_capable (sock_net (sk)->user_ns,CAP_NET_ADMIN )) { +if (!may_report_filterinfo) {nla_reserve (skb, attrtype,0 );return 0 ; }
net/dcb/dcbnl.c +1 -1
@@ -1670,7 +1670,7 @@ static int dcb_doit(struct sk_buff *skb, struct nlmsghdr *nlh)struct nlmsghdr *reply_nlh =NULL ;const struct reply_func *fn; -if ((nlh->nlmsg_type ==RTM_SETDCB ) && !capable (CAP_NET_ADMIN )) +if ((nlh->nlmsg_type ==RTM_SETDCB ) && !netlink_capable (skb,CAP_NET_ADMIN ))return -EPERM ; ret = nlmsg_parse(nlh, sizeof(*dcb), tb, DCB_ATTR_MAX,
net/decnet/dn_dev.c +2 -2
@@ -573,7 +573,7 @@ static int dn_nl_deladdr(struct sk_buff *skb, struct nlmsghdr *nlh)struct dn_ifaddr __rcu **ifap;int err = -EINVAL ; -if (!capable (CAP_NET_ADMIN )) +if (!netlink_capable (skb,CAP_NET_ADMIN ))return -EPERM ;if (!net_eq (net, &init_net))
@@ -617,7 +617,7 @@ static int dn_nl_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh)struct dn_ifaddr *ifa;int err; -if (!capable (CAP_NET_ADMIN )) +if (!netlink_capable (skb,CAP_NET_ADMIN ))return -EPERM ;if (!net_eq (net, &init_net))
net/decnet/dn_fib.c +2 -2
@@ -505,7 +505,7 @@ static int dn_fib_rtm_delroute(struct sk_buff *skb, struct nlmsghdr *nlh)struct nlattr *attrs[RTA_MAX +1 ];int err; -if (!capable (CAP_NET_ADMIN )) +if (!netlink_capable (skb,CAP_NET_ADMIN ))return -EPERM ;if (!net_eq (net, &init_net))
@@ -530,7 +530,7 @@ static int dn_fib_rtm_newroute(struct sk_buff *skb, struct nlmsghdr *nlh)struct nlattr *attrs[RTA_MAX +1 ];int err; -if (!capable (CAP_NET_ADMIN )) +if (!netlink_capable (skb,CAP_NET_ADMIN ))return -EPERM ;if (!net_eq (net, &init_net))
net/decnet/netfilter/dn_rtmsg.c +1 -1
@@ -107,7 +107,7 @@ static inline void dnrmg_receive_user_skb(struct sk_buff *skb)if (nlh->nlmsg_len <sizeof (*nlh) || skb->len < nlh->nlmsg_len)return ; -if (!capable (CAP_NET_ADMIN )) +if (!netlink_capable (skb,CAP_NET_ADMIN ))RCV_SKB_FAIL (-EPERM );/* Eventually we might send routing messages too */
net/ipv4/datagram.c +15 -5
@@ -86,18 +86,26 @@ out: }EXPORT_SYMBOL (ip4_datagram_connect); +/* Because UDP xmit path can manipulate sk_dst_cache without holding +* socket lock, we need to use sk_dst_set() here, +* even if we own the socket lock. +*/ void ip4_datagram_release_cb (struct sock *sk) {const struct inet_sock *inet =inet_sk (sk);const struct ip_options_rcu *inet_opt;__be32 daddr = inet->inet_daddr; +struct dst_entry *dst;struct flowi4 fl4;struct rtable *rt; -if (!__sk_dst_get (sk) ||__sk_dst_check (sk,0 )) -return ; -rcu_read_lock (); + + dst =__sk_dst_get (sk); +if (!dst || !dst->obsolete || dst->ops->check (dst,0 )) { +rcu_read_unlock (); +return ; + } inet_opt =rcu_dereference (inet->inet_opt);if (inet_opt && inet_opt->opt.srr) daddr = inet_opt->opt.faddr;
@@ -105,8 +113,10 @@ void ip4_datagram_release_cb(struct sock *sk) inet->inet_saddr, inet->inet_dport, inet->inet_sport, sk->sk_protocol, RT_CONN_FLAGS(sk), sk->sk_bound_dev_if); -if (!IS_ERR (rt)) -__sk_dst_set (sk, &rt->dst); + + dst = !IS_ERR (rt) ? &rt->dst :NULL ; +sk_dst_set (sk, dst); +rcu_read_unlock (); }EXPORT_SYMBOL_GPL (ip4_datagram_release_cb);
net/ipv4/ipip.c +3 -2
@@ -149,13 +149,13 @@ static int ipip_err(struct sk_buff *skb, u32 info)if (type ==ICMP_DEST_UNREACH && code ==ICMP_FRAG_NEEDED ) {ipv4_update_pmtu (skb,dev_net (skb->dev), info, - t->dev->ifindex,0 ,IPPROTO_IPIP ,0 ); + t->parms.link,0 ,IPPROTO_IPIP ,0 ); err =0 ; goto out; }if (type ==ICMP_REDIRECT ) { -ipv4_redirect (skb,dev_net (skb->dev), t->dev->ifindex,0 , +ipv4_redirect (skb,dev_net (skb->dev), t->parms.link,0 ,IPPROTO_IPIP ,0 ); err =0 ; goto out;
@@ -483,4 +483,5 @@ static void __exit ipip_fini(void)module_init (ipip_init);module_exit (ipip_fini);MODULE_LICENSE ("GPL" ); +MODULE_ALIAS_RTNL_LINK ("ipip" );MODULE_ALIAS_NETDEV ("tunl0" );
net/ipv4/tcp_input.c +5 -6
@@ -2720,13 +2720,12 @@ static void tcp_process_loss(struct sock *sk, int flag, bool is_dupack)bool recovered = !before (tp->snd_una, tp->high_seq);if (tp->frto) {/* F-RTO RFC5682 sec 3.1 (sack enhanced version). */ -if (flag &FLAG_ORIG_SACK_ACKED ) { -/* Step 3.b. A timeout is spurious if not all data are -* lost, i.e., never-retransmitted data are (s)acked. -*/ -tcp_try_undo_loss (sk, true); +/* Step 3.b. A timeout is spurious if not all data are +* lost, i.e., never-retransmitted data are (s)acked. +*/ +if (tcp_try_undo_loss (sk, flag &FLAG_ORIG_SACK_ACKED ))return ; - } +if (after (tp->snd_nxt, tp->high_seq) && (flag &FLAG_DATA_SACKED || is_dupack)) { tp->frto =0 ;/* Loss was real: 2nd part of step 3.a */
net/ipv6/ip6_tunnel.c +1 -0
@@ -61,6 +61,7 @@MODULE_AUTHOR ("Ville Nuorvala" );MODULE_DESCRIPTION ("IPv6 tunneling device" );MODULE_LICENSE ("GPL" ); +MODULE_ALIAS_RTNL_LINK ("ip6tnl" );MODULE_ALIAS_NETDEV ("ip6tnl0" );#ifdef IP6_TNL_DEBUG
net/ipv6/output_core.c +3 -8
@@ -9,7 +9,7 @@void ipv6_select_ident (struct frag_hdr *fhdr,struct rt6_info *rt) {static atomic_t ipv6_fragmentation_id; -int old, new; +int ident;#if IS_ENABLED (CONFIG_IPV6 )if (rt && !(rt->dst.flags &DST_NOPEER )) {
@@ -25,13 +25,8 @@ void ipv6_select_ident(struct frag_hdr *fhdr, struct rt6_info *rt) } }#endif -do { - old =atomic_read (&ipv6_fragmentation_id); - new = old +1 ; -if (!new) - new =1 ; - }while (atomic_cmpxchg (&ipv6_fragmentation_id, old, new) != old); - fhdr->identification =htonl (new); + ident =atomic_inc_return (&ipv6_fragmentation_id); + fhdr->identification =htonl (ident); }EXPORT_SYMBOL (ipv6_select_ident);
net/ipv6/sit.c +3 -2
@@ -530,12 +530,12 @@ static int ipip6_err(struct sk_buff *skb, u32 info)if (type ==ICMP_DEST_UNREACH && code ==ICMP_FRAG_NEEDED ) {ipv4_update_pmtu (skb,dev_net (skb->dev), info, - t->dev->ifindex,0 ,IPPROTO_IPV6 ,0 ); + t->parms.link,0 ,IPPROTO_IPV6 ,0 ); err =0 ; goto out; }if (type ==ICMP_REDIRECT ) { -ipv4_redirect (skb,dev_net (skb->dev), t->dev->ifindex,0 , +ipv4_redirect (skb,dev_net (skb->dev), t->parms.link,0 ,IPPROTO_IPV6 ,0 ); err =0 ; goto out;
@@ -1654,4 +1654,5 @@ xfrm_tunnel_failed:module_init (sit_init);module_exit (sit_cleanup);MODULE_LICENSE ("GPL" ); +MODULE_ALIAS_RTNL_LINK ("sit" );MODULE_ALIAS_NETDEV ("sit0" );
net/mac80211/iface.c +0 -1
@@ -1746,7 +1746,6 @@ void ieee80211_remove_interfaces(struct ieee80211_local *local) }mutex_unlock (&local->iflist_mtx);unregister_netdevice_many (&unreg_list); -list_del (&unreg_list);list_for_each_entry_safe (sdata, tmp, &wdev_list, list) {list_del (&sdata->list);
net/netfilter/nfnetlink.c +1 -1
@@ -147,7 +147,7 @@ static int nfnetlink_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh)const struct nfnetlink_subsystem *ss;int type, err; -if (!ns_capable (net->user_ns,CAP_NET_ADMIN )) +if (!netlink_net_capable (skb,CAP_NET_ADMIN ))return -EPERM ;/* All the messages must at least contain nfgenmsg */
net/netlink/af_netlink.c +75 -5
123 lines not on this page · raw message
net/netlink/genetlink.c +1 -1
@@ -592,7 +592,7 @@ static int genl_family_rcv_msg(struct genl_family *family,return -EOPNOTSUPP ;if ((ops->flags &GENL_ADMIN_PERM ) && - !capable (CAP_NET_ADMIN )) + !netlink_capable (skb,CAP_NET_ADMIN ))return -EPERM ;if (nlh->nlmsg_flags &NLM_F_DUMP ) {
net/packet/diag.c +6 -1
@@ -127,6 +127,7 @@ static int pdiag_put_fanout(struct packet_sock *po, struct sk_buff *nlskb)static int sk_diag_fill (struct sock *sk,struct sk_buff *skb,struct packet_diag_req *req, +bool may_report_filterinfo,struct user_namespace *user_ns,u32 portid,u32 seq,u32 flags,int sk_ino) {
@@ -171,7 +172,8 @@ static int sk_diag_fill(struct sock *sk, struct sk_buff *skb, goto out_nlmsg_trim;if ((req->pdiag_show &PACKET_SHOW_FILTER ) && -sock_diag_put_filterinfo (sk, skb,PACKET_DIAG_FILTER )) +sock_diag_put_filterinfo (may_report_filterinfo, sk, skb, +PACKET_DIAG_FILTER )) goto out_nlmsg_trim;return nlmsg_end (skb, nlh);
@@ -187,9 +189,11 @@ static int packet_diag_dump(struct sk_buff *skb, struct netlink_callback *cb)struct packet_diag_req *req;struct net *net;struct sock *sk; +bool may_report_filterinfo; net =sock_net (skb->sk); req =nlmsg_data (cb->nlh); + may_report_filterinfo =netlink_net_capable (cb->skb,CAP_NET_ADMIN );mutex_lock (&net->packet.sklist_lock);sk_for_each (sk, &net->packet.sklist) {
@@ -199,6 +203,7 @@ static int packet_diag_dump(struct sk_buff *skb, struct netlink_callback *cb) goto next; if (sk_diag_fill(sk, skb, req, + may_report_filterinfo, sk_user_ns(NETLINK_CB(cb->skb).sk), NETLINK_CB(cb->skb).portid, cb->nlh->nlmsg_seq, NLM_F_MULTI,
net/phonet/pn_netlink.c +4 -4
@@ -70,10 +70,10 @@ static int addr_doit(struct sk_buff *skb, struct nlmsghdr *nlh)int err;u8 pnaddr; -if (!capable (CAP_NET_ADMIN )) +if (!netlink_capable (skb,CAP_NET_ADMIN ))return -EPERM ; -if (!capable (CAP_SYS_ADMIN )) +if (!netlink_capable (skb,CAP_SYS_ADMIN ))return -EPERM ;ASSERT_RTNL ();
@@ -233,10 +233,10 @@ static int route_doit(struct sk_buff *skb, struct nlmsghdr *nlh)int err;u8 dst; -if (!capable (CAP_NET_ADMIN )) +if (!netlink_capable (skb,CAP_NET_ADMIN ))return -EPERM ; -if (!capable (CAP_SYS_ADMIN )) +if (!netlink_capable (skb,CAP_SYS_ADMIN ))return -EPERM ;ASSERT_RTNL ();
net/sched/act_api.c +1 -1
@@ -989,7 +989,7 @@ static int tc_ctl_action(struct sk_buff *skb, struct nlmsghdr *n)u32 portid = skb ?NETLINK_CB (skb).portid :0 ;int ret =0 , ovr =0 ; -if ((n->nlmsg_type !=RTM_GETACTION ) && !capable (CAP_NET_ADMIN )) +if ((n->nlmsg_type !=RTM_GETACTION ) && !netlink_capable (skb,CAP_NET_ADMIN ))return -EPERM ; ret =nlmsg_parse (n,sizeof (struct tcamsg ), tca,TCA_ACT_MAX ,NULL );
net/sched/cls_api.c +1 -1
@@ -138,7 +138,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n)int err;int tp_created =0 ; -if ((n->nlmsg_type !=RTM_GETTFILTER ) && !capable (CAP_NET_ADMIN )) +if ((n->nlmsg_type !=RTM_GETTFILTER ) && !netlink_capable (skb,CAP_NET_ADMIN ))return -EPERM ; replay:
net/sched/sch_api.c +3 -3
@@ -1024,7 +1024,7 @@ static int tc_get_qdisc(struct sk_buff *skb, struct nlmsghdr *n)struct Qdisc *p =NULL ;int err; -if ((n->nlmsg_type !=RTM_GETQDISC ) && !capable (CAP_NET_ADMIN )) +if ((n->nlmsg_type !=RTM_GETQDISC ) && !netlink_capable (skb,CAP_NET_ADMIN ))return -EPERM ; err =nlmsg_parse (n,sizeof (*tcm), tca,TCA_MAX ,NULL );
@@ -1091,7 +1091,7 @@ static int tc_modify_qdisc(struct sk_buff *skb, struct nlmsghdr *n)struct Qdisc *q, *p;int err; -if (!capable (CAP_NET_ADMIN )) +if (!netlink_capable (skb,CAP_NET_ADMIN ))return -EPERM ; replay:
@@ -1431,7 +1431,7 @@ static int tc_ctl_tclass(struct sk_buff *skb, struct nlmsghdr *n)u32 qid;int err; -if ((n->nlmsg_type !=RTM_GETTCLASS ) && !capable (CAP_NET_ADMIN )) +if ((n->nlmsg_type !=RTM_GETTCLASS ) && !netlink_capable (skb,CAP_NET_ADMIN ))return -EPERM ; err =nlmsg_parse (n,sizeof (*tcm), tca,TCA_MAX ,NULL );
net/sctp/associola.c +1 -1
@@ -387,7 +387,7 @@ void sctp_association_free(struct sctp_association *asoc)/* Only real associations count against the endpoint, so * don't bother for if this is a temporary association. */ -if (!asoc->temp) { +if (!list_empty (&asoc->asocs)) {list_del (&asoc->asocs);/* Decrement the backlog value for a TCP-style listening
net/tipc/netlink.c +1 -1
@@ -47,7 +47,7 @@ static int handle_cmd(struct sk_buff *skb, struct genl_info *info)int hdr_space =nlmsg_total_size (GENL_HDRLEN +TIPC_GENL_HDRLEN );u16 cmd; -if ((req_userhdr->cmd &0xC000 ) && (!capable (CAP_NET_ADMIN ))) +if ((req_userhdr->cmd &0xC000 ) && (!netlink_capable (skb,CAP_NET_ADMIN ))) cmd =TIPC_CMD_NOT_NET_ADMIN ;else cmd = req_userhdr->cmd;
net/xfrm/xfrm_user.c +1 -1
@@ -2362,7 +2362,7 @@ static int xfrm_user_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh) link = &xfrm_dispatch[type];/* All operations require privileges, even GET */ -if (!ns_capable (net->user_ns,CAP_NET_ADMIN )) +if (!netlink_net_capable (skb,CAP_NET_ADMIN ))return -EPERM ; if ((type == (XFRM_MSG_GETSA - XFRM_MSG_BASE) ||
security/integrity/evm/evm_main.c +10 -2
@@ -275,12 +275,20 @@ static int evm_protect_xattr(struct dentry *dentry, const char *xattr_name,* @xattr_value: pointer to the new extended attribute value * @xattr_value_len: pointer to the new extended attribute value length * -* Updating 'security.evm' requires CAP_SYS_ADMIN privileges and that -* the current value is valid. +* Before allowing the 'security.evm' protected xattr to be updated, +* verify the existing value is valid. As only the kernel should have +* access to the EVM encrypted key needed to calculate the HMAC, prevent +* userspace from writing HMAC value. Writing 'security.evm' requires +* requires CAP_SYS_ADMIN privileges. */ int evm_inode_setxattr (struct dentry *dentry,const char *xattr_name,const void *xattr_value,size_t xattr_value_len) { +const struct evm_ima_xattr_data *xattr_data = xattr_value; + +if ((strcmp (xattr_name,XATTR_NAME_EVM ) ==0 ) + && (xattr_data->type ==EVM_XATTR_HMAC )) +return -EPERM ;return evm_protect_xattr (dentry, xattr_name, xattr_value, xattr_value_len); }
security/integrity/ima/ima_crypto.c +31 -1
@@ -24,6 +24,36 @@static struct crypto_shash *ima_shash_tfm; +/** +* ima_kernel_read - read file content +* +* This is a function for reading file content instead of kernel_read(). +* It does not perform locking checks to ensure it cannot be blocked. +* It does not perform security checks because it is irrelevant for IMA. +* +*/ +static int ima_kernel_read (struct file *file,loff_t offset, +char *addr,unsigned long count) +{ +mm_segment_t old_fs; +char __user *buf = addr; +ssize_t ret; + +if (!(file->f_mode &FMODE_READ )) +return -EBADF ; +if (!file->f_op->read && !file->f_op->aio_read) +return -EINVAL ; + + old_fs =get_fs (); +set_fs (get_ds ()); +if (file->f_op->read) + ret = file->f_op->read (file, buf, count, &offset); +else + ret =do_sync_read (file, buf, count, &offset); +set_fs (old_fs); +return ret; +} +int ima_init_crypto (void ) {long rc;
@@ -70,7 +100,7 @@ int ima_calc_file_hash(struct file *file, char *digest)while (offset < i_size) {int rbuf_len; - rbuf_len =kernel_read (file, offset, rbuf,PAGE_SIZE ); + rbuf_len =ima_kernel_read (file, offset, rbuf,PAGE_SIZE );if (rbuf_len <0 ) { rc = rbuf_len;break ;
sound/core/control.c +51 -27
185 lines not on this page · raw message
sound/core/init.c +1 -0
@@ -208,6 +208,7 @@ int snd_card_create(int idx, const char *xid,INIT_LIST_HEAD (&card->devices);init_rwsem (&card->controls_rwsem);rwlock_init (&card->ctl_files_rwlock); +mutex_init (&card->user_ctl_lock);INIT_LIST_HEAD (&card->controls);INIT_LIST_HEAD (&card->ctl_files);spin_lock_init (&card->files_lock);
sound/pci/hda/patch_realtek.c +10 -0
@@ -3356,6 +3356,7 @@ enum {ALC269_FIXUP_STEREO_DMIC ,ALC269_FIXUP_QUANTA_MUTE ,ALC269_FIXUP_LIFEBOOK , +ALC269_FIXUP_LIFEBOOK_EXTMIC ,ALC269_FIXUP_AMIC ,ALC269_FIXUP_DMIC , ALC269VB_FIXUP_AMIC,
@@ -3463,6 +3464,13 @@ static const struct hda_fixup alc269_fixups[] = { .chained = true, .chain_id =ALC269_FIXUP_QUANTA_MUTE }, + [ALC269_FIXUP_LIFEBOOK_EXTMIC] = { + .type = HDA_FIXUP_PINS, + .v.pins = (const struct hda_pintbl []) { + {0x19 ,0x01a1903c },/* headset mic, with jack detect */ + { } + }, + }, [ALC269_FIXUP_AMIC] = { .type = HDA_FIXUP_PINS, .v.pins = (const struct hda_pintbl []) {
@@ -3713,6 +3721,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x1025 ,0x0742 ,"Acer AO756" ,ALC271_FIXUP_HP_GATE_MIC_JACK ),SND_PCI_QUIRK_VENDOR (0x1025 ,"Acer Aspire" ,ALC271_FIXUP_DMIC ),SND_PCI_QUIRK (0x10cf ,0x1475 ,"Lifebook" ,ALC269_FIXUP_LIFEBOOK ), +SND_PCI_QUIRK (0x10cf ,0x1845 ,"Lifebook U904" ,ALC269_FIXUP_LIFEBOOK_EXTMIC ),SND_PCI_QUIRK (0x17aa ,0x20f2 ,"Thinkpad SL410/510" ,ALC269_FIXUP_SKU_IGNORE ),SND_PCI_QUIRK (0x17aa ,0x215e ,"Thinkpad L512" ,ALC269_FIXUP_SKU_IGNORE ), SND_PCI_QUIRK(0x17aa, 0x21b8, "Thinkpad Edge 14", ALC269_FIXUP_SKU_IGNORE),
@@ -4664,6 +4673,7 @@ static const struct hda_codec_preset snd_hda_preset_realtek[] = { { .id = 0x10ec0670, .name = "ALC670", .patch = patch_alc662 }, { .id = 0x10ec0671, .name = "ALC671", .patch = patch_alc662 }, { .id = 0x10ec0680, .name = "ALC680", .patch = patch_alc680 }, + { .id = 0x10ec0867, .name = "ALC891", .patch = patch_alc882 }, { .id = 0x10ec0880, .name = "ALC880", .patch = patch_alc880 }, { .id = 0x10ec0882, .name = "ALC882", .patch = patch_alc882 }, { .id = 0x10ec0883, .name = "ALC883", .patch = patch_alc882 },
sound/soc/codecs/max98090.c +3 -0
@@ -255,6 +255,7 @@ static struct reg_default max98090_reg[] = {static bool max98090_volatile_register (struct device *dev,unsigned int reg) {switch (reg) { +case M98090_REG_SOFTWARE_RESET :case M98090_REG_DEVICE_STATUS :case M98090_REG_JACK_STATUS :case M98090_REG_REVISION_ID :
@@ -2343,6 +2344,8 @@ static int max98090_runtime_resume(struct device *dev)regcache_cache_only (max98090->regmap, false); +max98090_reset (max98090); +regcache_sync (max98090->regmap);return 0 ;