Linux 3.11.10
Greg KH
maintainerI'm announcing the release of the 3.11.10 kernel.
All users of the 3.11 kernel series must upgrade.
Note, this is the LAST 3.11.x kernel to be releases, please move to 3.12.x at this point in time. 3.11.x is end-of-life, not to be updated again.
The updated 3.11.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.11.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/ia64/include/asm/processor.h | 2 arch/s390/crypto/aes_s390.c | 19 +- arch/x86/kernel/process.c | 6 crypto/ansi_cprng.c | 4 drivers/acpi/acpica/exoparg1.c | 48 +++++ drivers/acpi/acpica/exstore.c | 166 ++++++++++++-------- drivers/acpi/ec.c | 3 drivers/acpi/pci_root.c | 5 drivers/acpi/processor_idle.c | 46 +---- drivers/acpi/scan.c | 2 drivers/acpi/video.c | 2 drivers/bluetooth/btusb.c | 1 drivers/gpu/drm/nouveau/core/engine/graph/ctxnvc1.c | 4 drivers/gpu/drm/nouveau/core/engine/graph/ctxnvd7.c | 1 drivers/gpu/drm/nouveau/core/engine/graph/ctxnvd9.c | 1 drivers/hv/channel_mgmt.c | 5 drivers/idle/intel_idle.c | 2 drivers/net/can/c_can/c_can.c | 6 drivers/net/can/usb/kvaser_usb.c | 20 +- drivers/net/ethernet/atheros/alx/main.c | 3 drivers/net/wireless/libertas/debugfs.c | 6 drivers/net/wireless/rt2x00/rt2800lib.c | 11 - drivers/net/wireless/rt2x00/rt2x00dev.c | 3 drivers/net/wireless/rt2x00/rt2x00lib.h | 2 drivers/net/wireless/rt2x00/rt2x00mac.c | 7 drivers/net/wireless/rt2x00/rt2x00queue.c | 4 drivers/pci/access.c | 19 +- drivers/platform/x86/thinkpad_acpi.c | 7 drivers/scsi/aacraid/commctrl.c | 3 drivers/staging/comedi/comedi_fops.c | 5 drivers/staging/zram/zram_drv.c | 6 drivers/usb/serial/mos7840.c | 4 fs/btrfs/relocation.c | 18 +- fs/exec.c | 6 include/linux/binfmts.h | 3 include/linux/sched.h | 82 +++++++++ include/linux/thread_info.h | 2 ipc/shm.c | 37 +++- kernel/cpu/idle.c | 9 - kernel/ptrace.c | 3 kernel/trace/trace_event_perf.c | 2 net/sunrpc/clnt.c | 2 security/integrity/ima/ima_policy.c | 1 44 files changed, 395 insertions(+), 195 deletions(-)
Aaron Lu (1):
ACPI / video: Quirk initial backlight level 0
Andy Adamson (1):
SUNRPC: don't map EKEYEXPIRED to EACCES in call_refreshresult
Ben Skeggs (1):
drm/nvc0-/gr: fix a number of missing explicit array terminators...
Bjorn Helgaas (3):
PCI: Allow PCIe Capability link-related register access for switches
PCI: Remove PCIe Capability version checks
PCI: Support PCIe Capability Slot registers only for ports with slots
Bob Moore (3):
ACPICA: DeRefOf operator: Update to fully resolve FieldUnit and BufferField refs.
ACPICA: Return error if DerefOf resolves to a null package element.
ACPICA: Fix for a Store->ArgX when ArgX contains a reference to a field.
Dan Carpenter (1):
libertas: potential oops in debugfs
Felix Fietkau (1):
rt2x00: fix a crash bug in the HT descriptor handling fix
Gabor Juhos (1):
rt2x00: rt2800lib: fix VGC adjustment for RT5592
Greg Kroah-Hartman (1):
Linux 3.11.10
Greg Thelen (1):
ipc,shm: fix shm_file deletion races
Hans de Goede (1):
Bluetooth: revert: "Bluetooth: Add missing reset_resume dev_pm_ops"
Herbert Xu (1):
crypto: s390 - Fix aes-cbc IV corruption
Ian Abbott (1):
staging: comedi: avoid memleak for subdevice private
Jesper Nilsson (1):
ipc,shm: correct error return value in shmctl (SHM_UNLOCK)
Johan Hovold (1):
USB: mos7840: fix tiocmget error handling
Josef Bacik (1):
Btrfs: relocate csums properly with prealloc extents
K. Y. Srinivasan (1):
Drivers: hv: vmbus: Fix a bug in channel rescind code
Kees Cook (1):
exec/ptrace: fix get_dumpable() incorrect tests
Mahesh Rajashekhara (1):
aacraid: prevent invalid pointer dereference
Markus Pargmann (1):
can: c_can: Fix RX message handling, handle lost message before EOB
Mimi Zohar (1):
Revert "ima: policy for RAMFS"
Neil Horman (1):
crypto: ansi_cprng - Fix off by one error in non-block size request
Olivier Sobrie (1):
can: kvaser_usb: fix usb endpoints detection
Peter Zijlstra (1):
sched, idle: Fix the idle polling state logic
Puneet Kumar (1):
ACPI / EC: Ensure lock is acquired before accessing ec struct members
Rafael J. Wysocki (2):
ACPI / hotplug: Fix handle_root_bridge_removal() ACPI / hotplug: Do not execute "insert in progress" _OST
Rashika Kheria (1):
Staging: zram: Fix access of NULL pointer
Stanislaw Gruszka (2):
rt2x00: check if device is still available on rt2x00mac_flush()
rt2x00: fix HT TX descriptor settings regression
Steven Rostedt (1):
perf/ftrace: Fix paranoid level for enabling function tracer
Takashi Iwai (1):
thinkpad_acpi: Fix build error when CONFIG_SND_MAX_CARDS > 32
hahnjo (1):
alx: Reset phy speed after resume
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 11 -SUBLEVEL = 9 +SUBLEVEL = 10 EXTRAVERSION = NAME = Linux for Workgroups
arch/ia64/include/asm/processor.h +1 -1
@@ -319,7 +319,7 @@ struct thread_struct { regs->loadrs =0 ; \ regs->r8 =get_dumpable (current->mm);/* set "don't zap registers" flag */ \ regs->r12 = new_sp -16 ;/* allocate 16 byte scratch area */ \ -if (unlikely (!get_dumpable (current->mm))) { \ +if (unlikely (get_dumpable (current->mm) !=SUID_DUMP_USER )) { \/* \ * Zap scratch regs to avoid leaking bits between processes with different \ * uid/privileges. \
arch/s390/crypto/aes_s390.c +12 -7
@@ -35,7 +35,6 @@ static u8 *ctrblk;static char keylen_flag;struct s390_aes_ctx { -u8 iv[AES_BLOCK_SIZE ];u8 key[AES_MAX_KEY_SIZE ];long enc;long dec;
@@ -441,30 +440,36 @@ static int cbc_aes_set_key(struct crypto_tfm *tfm, const u8 *in_key,return aes_set_key (tfm, in_key, key_len); } -static int cbc_aes_crypt (struct blkcipher_desc *desc,long func,void *param, +static int cbc_aes_crypt (struct blkcipher_desc *desc,long func,struct blkcipher_walk *walk) { +struct s390_aes_ctx *sctx =crypto_blkcipher_ctx (desc->tfm);int ret =blkcipher_walk_virt (desc, walk);unsigned int nbytes = walk->nbytes; +struct { +u8 iv[AES_BLOCK_SIZE ]; +u8 key[AES_MAX_KEY_SIZE ]; + } param;if (!nbytes) goto out; -memcpy (param, walk->iv,AES_BLOCK_SIZE ); +memcpy (param.iv, walk->iv,AES_BLOCK_SIZE ); +memcpy (param.key, sctx->key, sctx->key_len);do {/* only use complete blocks */ unsigned int n = nbytes & ~(AES_BLOCK_SIZE -1 );u8 *out = walk->dst.virt.addr;u8 *in = walk->src.virt.addr; - ret =crypt_s390_kmc (func, param, out, in, n); + ret =crypt_s390_kmc (func, ¶m, out, in, n);if (ret <0 || ret != n)return -EIO ; nbytes &=AES_BLOCK_SIZE -1 ; ret =blkcipher_walk_done (desc, walk, nbytes); }while ((nbytes = walk->nbytes)); -memcpy (walk->iv, param,AES_BLOCK_SIZE ); +memcpy (walk->iv, param.iv,AES_BLOCK_SIZE ); out:return ret;
@@ -481,7 +486,7 @@ static int cbc_aes_encrypt(struct blkcipher_desc *desc,return fallback_blk_enc (desc, dst, src, nbytes);blkcipher_walk_init (&walk, dst, src, nbytes); -return cbc_aes_crypt (desc, sctx->enc, sctx->iv, &walk); +return cbc_aes_crypt (desc, sctx->enc, &walk); } static int cbc_aes_decrypt(struct blkcipher_desc *desc,
@@ -495,7 +500,7 @@ static int cbc_aes_decrypt(struct blkcipher_desc *desc,return fallback_blk_dec (desc, dst, src, nbytes);blkcipher_walk_init (&walk, dst, src, nbytes); -return cbc_aes_crypt (desc, sctx->dec, sctx->iv, &walk); +return cbc_aes_crypt (desc, sctx->dec, &walk); }static struct crypto_alg cbc_aes_alg = {
arch/x86/kernel/process.c +3 -3
@@ -391,9 +391,9 @@ static void amd_e400_idle(void)* The switch back from broadcast mode needs to be * called with interrupts disabled. */ -local_irq_disable (); -clockevents_notify (CLOCK_EVT_NOTIFY_BROADCAST_EXIT , &cpu); -local_irq_enable (); +local_irq_disable (); +clockevents_notify (CLOCK_EVT_NOTIFY_BROADCAST_EXIT , &cpu); +local_irq_enable (); }else default_idle (); }
crypto/ansi_cprng.c +2 -2
@@ -230,11 +230,11 @@ remainder:*/ if (byte_count <DEFAULT_BLK_SZ ) { empty_rbuf: -for (; ctx->rand_data_valid <DEFAULT_BLK_SZ ; - ctx->rand_data_valid++) { +while (ctx->rand_data_valid <DEFAULT_BLK_SZ ) { *ptr = ctx->rand_data[ctx->rand_data_valid]; ptr++; byte_count--; + ctx->rand_data_valid++;if (byte_count ==0 ) goto done; }
drivers/acpi/acpica/exoparg1.c +42 -6
63 lines not on this page · raw message
drivers/acpi/acpica/exstore.c +102 -64
218 lines not on this page · raw message
drivers/acpi/ec.c +2 -1
@@ -175,9 +175,10 @@ static void start_transaction(struct acpi_ec *ec)static void advance_transaction (struct acpi_ec *ec,u8 status) {unsigned long flags; -struct transaction *t = ec->curr; +struct transaction *t;spin_lock_irqsave (&ec->lock, flags); + t = ec->curr;if (!t) goto unlock;if (t->wlen > t->wi) {
drivers/acpi/pci_root.c +4 -1
@@ -611,9 +611,12 @@ static void handle_root_bridge_removal(struct acpi_device *device) ej_event->device = device; ej_event->event =ACPI_NOTIFY_EJECT_REQUEST ; +get_device (&device->dev); status =acpi_os_hotplug_execute (acpi_bus_hot_remove_device, ej_event); -if (ACPI_FAILURE (status)) +if (ACPI_FAILURE (status)) { +put_device (&device->dev);kfree (ej_event); + } }static void _handle_hotplug_event_root (struct work_struct *work)
drivers/acpi/processor_idle.c +10 -36
87 lines not on this page · raw message
drivers/acpi/scan.c +0 -2
@@ -359,8 +359,6 @@ static void acpi_scan_bus_device_check(acpi_handle handle, u32 ost_source) goto out; } } -acpi_evaluate_hotplug_ost (handle, ost_source, -ACPI_OST_SC_INSERT_IN_PROGRESS ,NULL ); error =acpi_bus_scan (handle);if (error) {acpi_handle_warn (handle,"Namespace scan failure\n" );
drivers/acpi/video.c +1 -1
@@ -848,7 +848,7 @@ acpi_video_init_brightness(struct acpi_video_device *device)for (i =2 ; i < br->count; i++)if (level_old == br->levels[i])break ; -if (i == br->count) +if (i == br->count || !level) level = max_level; }
drivers/bluetooth/btusb.c +0 -1
@@ -1625,7 +1625,6 @@ static struct usb_driver btusb_driver = {#ifdef CONFIG_PM .suspend = btusb_suspend, .resume = btusb_resume, - .reset_resume = btusb_resume, #endif .id_table = btusb_table, .supports_autosuspend = 1,
drivers/gpu/drm/nouveau/core/engine/graph/ctxnvc1.c +4 -0
@@ -587,6 +587,7 @@ nvc1_grctx_init_unk58xx[] = { { 0x405870, 4, 0x04, 0x00000001 }, { 0x405a00, 2, 0x04, 0x00000000 }, { 0x405a18, 1, 0x04, 0x00000000 }, + {} }; static struct nvc0_graph_init
@@ -598,6 +599,7 @@ nvc1_grctx_init_rop[] = { { 0x408904, 1, 0x04, 0x62000001 }, { 0x408908, 1, 0x04, 0x00c80929 }, { 0x408980, 1, 0x04, 0x0000011d }, + {} }; static struct nvc0_graph_init
@@ -671,6 +673,7 @@ nvc1_grctx_init_gpc_0[] = { { 0x419000, 1, 0x04, 0x00000780 }, { 0x419004, 2, 0x04, 0x00000000 }, { 0x419014, 1, 0x04, 0x00000004 }, + {} }; static struct nvc0_graph_init
@@ -717,6 +720,7 @@ nvc1_grctx_init_tpc[] = { { 0x419e98, 1, 0x04, 0x00000000 }, { 0x419ee0, 1, 0x04, 0x00011110 }, { 0x419f30, 11, 0x04, 0x00000000 }, + {} };void
drivers/gpu/drm/nouveau/core/engine/graph/ctxnvd7.c +1 -0
@@ -258,6 +258,7 @@ nvd7_grctx_init_hub[] = { nvc0_grctx_init_unk78xx, nvc0_grctx_init_unk80xx, nvd9_grctx_init_rop, +NULL }; struct nvc0_graph_init *
drivers/gpu/drm/nouveau/core/engine/graph/ctxnvd9.c +1 -0
@@ -466,6 +466,7 @@ nvd9_grctx_init_hub[] = { nvc0_grctx_init_unk78xx, nvc0_grctx_init_unk80xx, nvd9_grctx_init_rop, +NULL }; struct nvc0_graph_init *
drivers/hv/channel_mgmt.c +3 -2
@@ -172,7 +172,8 @@ static void vmbus_process_rescind_offer(struct work_struct *work)struct vmbus_channel *primary_channel;struct vmbus_channel_relid_released msg; -vmbus_device_unregister (channel->device_obj); +if (channel->device_obj) +vmbus_device_unregister (channel->device_obj);memset (&msg,0 ,sizeof (struct vmbus_channel_relid_released )); msg.child_relid = channel->offermsg.child_relid; msg.header.msgtype =CHANNELMSG_RELID_RELEASED ;
@@ -185,7 +186,7 @@ static void vmbus_process_rescind_offer(struct work_struct *work) }else { primary_channel = channel->primary_channel;spin_lock_irqsave (&primary_channel->sc_lock, flags); -list_del (&channel->listentry); +list_del (&channel->sc_list);spin_unlock_irqrestore (&primary_channel->sc_lock, flags); }free_channel (channel);
drivers/idle/intel_idle.c +1 -1
@@ -359,7 +359,7 @@ static int intel_idle(struct cpuidle_device *dev,if (!(lapic_timer_reliable_states & (1 << (cstate))))clockevents_notify (CLOCK_EVT_NOTIFY_BROADCAST_ENTER , &cpu); -if (!need_resched ()) { +if (!current_set_polling_and_test ()) {__monitor ((void *)¤t_thread_info ()->flags,0 ,0 );smp_mb ();
drivers/net/can/c_can/c_can.c +3 -3
@@ -814,9 +814,6 @@ static int c_can_do_rx_poll(struct net_device *dev, int quota) msg_ctrl_save = priv->read_reg (priv,C_CAN_IFACE (MSGCTRL_REG ,0 )); -if (msg_ctrl_save &IF_MCONT_EOB ) -return num_rx_pkts; -if (msg_ctrl_save &IF_MCONT_MSGLST ) {c_can_handle_lost_msg_obj (dev,0 , msg_obj); num_rx_pkts++;
@@ -824,6 +821,9 @@ static int c_can_do_rx_poll(struct net_device *dev, int quota)continue ; } +if (msg_ctrl_save &IF_MCONT_EOB ) +return num_rx_pkts; +if (!(msg_ctrl_save &IF_MCONT_NEWDAT ))continue ;
drivers/net/can/usb/kvaser_usb.c +13 -7
@@ -1544,9 +1544,9 @@ static int kvaser_usb_init_one(struct usb_interface *intf,return 0 ; } -static void kvaser_usb_get_endpoints (const struct usb_interface *intf, -struct usb_endpoint_descriptor **in, -struct usb_endpoint_descriptor **out) +static int kvaser_usb_get_endpoints (const struct usb_interface *intf, +struct usb_endpoint_descriptor **in, +struct usb_endpoint_descriptor **out) {const struct usb_host_interface *iface_desc;struct usb_endpoint_descriptor *endpoint;
@@ -1557,12 +1557,18 @@ static void kvaser_usb_get_endpoints(const struct usb_interface *intf,for (i =0 ; i < iface_desc->desc.bNumEndpoints; ++i) { endpoint = &iface_desc->endpoint[i].desc; -if (usb_endpoint_is_bulk_in (endpoint)) +if (!*in &&usb_endpoint_is_bulk_in (endpoint)) *in = endpoint; -if (usb_endpoint_is_bulk_out (endpoint)) +if (!*out &&usb_endpoint_is_bulk_out (endpoint)) *out = endpoint; + +/* use first bulk endpoint for in and out */ +if (*in && *out) +return 0 ; } + +return -ENODEV ; } static int kvaser_usb_probe(struct usb_interface *intf,
@@ -1576,8 +1582,8 @@ static int kvaser_usb_probe(struct usb_interface *intf,if (!dev)return -ENOMEM ; -kvaser_usb_get_endpoints (intf, &dev->bulk_in, &dev->bulk_out); -if (!dev->bulk_in || !dev->bulk_out) { + err =kvaser_usb_get_endpoints (intf, &dev->bulk_in, &dev->bulk_out); +if (err) {dev_err (&intf->dev,"Cannot get usb endpoint(s)" );return err; }
drivers/net/ethernet/atheros/alx/main.c +3 -0
@@ -1394,6 +1394,9 @@ static int alx_resume(struct device *dev) {struct pci_dev *pdev =to_pci_dev (dev);struct alx_priv *alx =pci_get_drvdata (pdev); +struct alx_hw *hw = &alx->hw; + +alx_reset_phy (hw);if (!netif_running (alx->dev))return 0 ;
drivers/net/wireless/libertas/debugfs.c +5 -1
@@ -913,7 +913,10 @@ static ssize_t lbs_debugfs_write(struct file *f, const char __user *buf,char *p2;struct debug_data *d = f->private_data; - pdata =kmalloc (cnt,GFP_KERNEL ); +if (cnt ==0 ) +return 0 ; + + pdata =kmalloc (cnt +1 ,GFP_KERNEL );if (pdata ==NULL )return 0 ;
@@ -922,6 +925,7 @@ static ssize_t lbs_debugfs_write(struct file *f, const char __user *buf,kfree (pdata);return 0 ; } + pdata[cnt] ='\0' ; p0 = pdata;for (i =0 ; i < num_of_items; i++) {
drivers/net/wireless/rt2x00/rt2800lib.c +7 -4
@@ -3423,10 +3423,13 @@ void rt2800_link_tuner(struct rt2x00_dev *rt2x00dev, struct link_qual *qual, vgc =rt2800_get_default_vgc (rt2x00dev); -if (rt2x00_rt (rt2x00dev,RT5592 ) && qual->rssi >-65 ) - vgc +=0x20 ; -else if (qual->rssi >-80 ) - vgc +=0x10 ; +if (rt2x00_rt (rt2x00dev,RT5592 )) { +if (qual->rssi >-65 ) + vgc +=0x20 ; + }else { +if (qual->rssi >-80 ) + vgc +=0x10 ; + }rt2800_set_vgc (rt2x00dev, qual, vgc); }
drivers/net/wireless/rt2x00/rt2x00dev.c +2 -1
@@ -181,6 +181,7 @@ static void rt2x00lib_autowakeup(struct work_struct *work)static void rt2x00lib_bc_buffer_iter (void *data,u8 *mac,struct ieee80211_vif *vif) { +struct ieee80211_tx_control control = {};struct rt2x00_dev *rt2x00dev = data;struct sk_buff *skb;
@@ -195,7 +196,7 @@ static void rt2x00lib_bc_buffer_iter(void *data, u8 *mac,*/ skb =ieee80211_get_buffered_bc (rt2x00dev->hw, vif);while (skb) { -rt2x00mac_tx (rt2x00dev->hw,NULL , skb); +rt2x00mac_tx (rt2x00dev->hw, &control, skb); skb =ieee80211_get_buffered_bc (rt2x00dev->hw, vif); } }
drivers/net/wireless/rt2x00/rt2x00lib.h +1 -1
@@ -146,7 +146,7 @@ void rt2x00queue_remove_l2pad(struct sk_buff *skb, unsigned int header_length);* @local: frame is not from mac80211 */ int rt2x00queue_write_tx_frame (struct data_queue *queue,struct sk_buff *skb, -bool local); +struct ieee80211_sta *sta,bool local);/** * rt2x00queue_update_beacon - Send new beacon from mac80211
drivers/net/wireless/rt2x00/rt2x00mac.c +5 -2
@@ -90,7 +90,7 @@ static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev, frag_skb->data, data_length, tx_info, (struct ieee80211_rts *)(skb->data)); - retval =rt2x00queue_write_tx_frame (queue, skb, true); + retval =rt2x00queue_write_tx_frame (queue, skb,NULL , true);if (retval) {dev_kfree_skb_any (skb);rt2x00_warn (rt2x00dev,"Failed to send RTS/CTS frame\n" );
@@ -151,7 +151,7 @@ void rt2x00mac_tx(struct ieee80211_hw *hw, goto exit_fail; } -if (unlikely (rt2x00queue_write_tx_frame (queue, skb, false))) +if (unlikely (rt2x00queue_write_tx_frame (queue, skb, control->sta, false))) goto exit_fail;/*
@@ -754,6 +754,9 @@ void rt2x00mac_flush(struct ieee80211_hw *hw, u32 queues, bool drop)struct rt2x00_dev *rt2x00dev = hw->priv;struct data_queue *queue; +if (!test_bit (DEVICE_STATE_PRESENT , &rt2x00dev->flags)) +return ; +tx_queue_for_each (rt2x00dev, queue)rt2x00queue_flush_queue (queue, drop); }
drivers/net/wireless/rt2x00/rt2x00queue.c +2 -2
@@ -635,7 +635,7 @@ static void rt2x00queue_bar_check(struct queue_entry *entry) }int rt2x00queue_write_tx_frame (struct data_queue *queue,struct sk_buff *skb, -bool local) +struct ieee80211_sta *sta,bool local) {struct ieee80211_tx_info *tx_info;struct queue_entry *entry;
@@ -649,7 +649,7 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb,* after that we are free to use the skb->cb array * for our information. */ -rt2x00queue_create_tx_descriptor (queue->rt2x00dev, skb, &txdesc,NULL ); +rt2x00queue_create_tx_descriptor (queue->rt2x00dev, skb, &txdesc, sta);/* * All information is retrieved from the skb->cb array,
drivers/pci/access.c +10 -9
@@ -484,28 +484,29 @@ static inline bool pcie_cap_has_lnkctl(const struct pci_dev *dev) {int type =pci_pcie_type (dev); -return pcie_cap_version (dev) >1 || +return type ==PCI_EXP_TYPE_ENDPOINT || + type ==PCI_EXP_TYPE_LEG_END || type ==PCI_EXP_TYPE_ROOT_PORT || - type ==PCI_EXP_TYPE_ENDPOINT || - type ==PCI_EXP_TYPE_LEG_END ; + type ==PCI_EXP_TYPE_UPSTREAM || + type ==PCI_EXP_TYPE_DOWNSTREAM || + type ==PCI_EXP_TYPE_PCI_BRIDGE || + type ==PCI_EXP_TYPE_PCIE_BRIDGE ; }static inline bool pcie_cap_has_sltctl (const struct pci_dev *dev) {int type =pci_pcie_type (dev); -return pcie_cap_version (dev) >1 || - type ==PCI_EXP_TYPE_ROOT_PORT || - (type ==PCI_EXP_TYPE_DOWNSTREAM && -pcie_caps_reg (dev) &PCI_EXP_FLAGS_SLOT ); +return (type ==PCI_EXP_TYPE_ROOT_PORT || + type ==PCI_EXP_TYPE_DOWNSTREAM ) && +pcie_caps_reg (dev) &PCI_EXP_FLAGS_SLOT ; }static inline bool pcie_cap_has_rtctl (const struct pci_dev *dev) {int type =pci_pcie_type (dev); -return pcie_cap_version (dev) >1 || - type ==PCI_EXP_TYPE_ROOT_PORT || +return type ==PCI_EXP_TYPE_ROOT_PORT || type ==PCI_EXP_TYPE_RC_EC ; }
drivers/platform/x86/thinkpad_acpi.c +6 -1
@@ -6438,7 +6438,12 @@ static struct ibm_struct brightness_driver_data = {#define TPACPI_ALSA_SHRTNAME "ThinkPad Console Audio Control"#define TPACPI_ALSA_MIXERNAME TPACPI_ALSA_SHRTNAME -static int alsa_index = ~((1 << (SNDRV_CARDS -3 )) -1 );/* last three slots */ +#if SNDRV_CARDS <=32 +#define DEFAULT_ALSA_IDX ~((1 << (SNDRV_CARDS - 3)) - 1) +#else +#define DEFAULT_ALSA_IDX ~((1 << (32 - 3)) - 1) +#endif +static int alsa_index =DEFAULT_ALSA_IDX ;/* last three slots */ static char *alsa_id ="ThinkPadEC" ;static bool alsa_enable =SNDRV_DEFAULT_ENABLE1 ;
drivers/scsi/aacraid/commctrl.c +2 -1
@@ -511,7 +511,8 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg) goto cleanup; } -if (fibsize > (dev->max_fib_size -sizeof (struct aac_fibhdr ))) { +if ((fibsize < (sizeof (struct user_aac_srb ) -sizeof (struct user_sgentry ))) || + (fibsize > (dev->max_fib_size -sizeof (struct aac_fibhdr )))) { rcode = -EINVAL ; goto cleanup; }
drivers/staging/comedi/comedi_fops.c +3 -2
@@ -543,7 +543,7 @@ void *comedi_alloc_spriv(struct comedi_subdevice *s, size_t size) { s->private =kzalloc (size,GFP_KERNEL );if (s->private) -comedi_set_subdevice_runflags (s, ~0 ,SRF_FREE_SPRIV ); + s->runflags |=SRF_FREE_SPRIV ;return s->private; }EXPORT_SYMBOL_GPL (comedi_alloc_spriv);
@@ -1485,7 +1485,8 @@ static int do_cmd_ioctl(struct comedi_device *dev,if (async->cmd.flags &TRIG_WAKE_EOS ) async->cb_mask |=COMEDI_CB_EOS ; -comedi_set_subdevice_runflags (s, ~0 ,SRF_USER |SRF_RUNNING ); +comedi_set_subdevice_runflags (s,SRF_USER |SRF_ERROR |SRF_RUNNING , +SRF_USER |SRF_RUNNING );/* set s->busy _after_ setting SRF_RUNNING flag to avoid race with * comedi_read() or comedi_write() */
drivers/staging/zram/zram_drv.c +4 -2
@@ -647,6 +647,9 @@ static ssize_t reset_store(struct device *dev, zram =dev_to_zram (dev); bdev =bdget_disk (zram->disk,0 ); +if (!bdev) +return -ENOMEM ; +/* Do not reset an active device! */ if (bdev->bd_holders)return -EBUSY ;
@@ -659,8 +662,7 @@ static ssize_t reset_store(struct device *dev,return -EINVAL ;/* Make sure all pending I/O is finished */ -if (bdev) -fsync_bdev (bdev); +fsync_bdev (bdev);zram_reset_device (zram, true);return len;
drivers/usb/serial/mos7840.c +4 -0
@@ -1580,7 +1580,11 @@ static int mos7840_tiocmget(struct tty_struct *tty)return -ENODEV ; status =mos7840_get_uart_reg (port,MODEM_STATUS_REGISTER , &msr); +if (status !=1 ) +return -EIO ; status =mos7840_get_uart_reg (port,MODEM_CONTROL_REGISTER , &mcr); +if (status !=1 ) +return -EIO ; result = ((mcr &MCR_DTR ) ?TIOCM_DTR :0 ) | ((mcr &MCR_RTS ) ?TIOCM_RTS :0 ) | ((mcr &MCR_LOOPBACK ) ?TIOCM_LOOP :0 )
fs/btrfs/relocation.c +15 -3
@@ -4462,6 +4462,7 @@ int btrfs_reloc_clone_csums(struct inode *inode, u64 file_pos, u64 len)struct btrfs_root *root =BTRFS_I (inode)->root;int ret;u64 disk_bytenr; +u64 new_bytenr;LIST_HEAD (list); ordered =btrfs_lookup_ordered_extent (inode, file_pos);
@@ -4473,13 +4474,24 @@ int btrfs_reloc_clone_csums(struct inode *inode, u64 file_pos, u64 len)if (ret) goto out; - disk_bytenr = ordered->start;while (!list_empty (&list)) { sums = list_entry(list.next, struct btrfs_ordered_sum, list);list_del_init (&sums->list); - sums->bytenr = disk_bytenr; - disk_bytenr += sums->len; +/* +* We need to offset the new_bytenr based on where the csum is. +* We need to do this because we will read in entire prealloc +* extents but we may have written to say the middle of the +* prealloc extent, so we need to make sure the csum goes with +* the right disk offset. +* +* We can do this because the data reloc inode refers strictly +* to the on disk bytes, so we don't have to worry about +* disk_len vs real len like with real inodes since it's all +* disk length. +*/ + new_bytenr = ordered->start + (sums->bytenr - disk_bytenr); + sums->bytenr = new_bytenr;btrfs_add_ordered_sum (inode, ordered, sums); }
fs/exec.c +6 -0
@@ -1670,6 +1670,12 @@ int __get_dumpable(unsigned long mm_flags)return (ret >SUID_DUMP_USER ) ?SUID_DUMP_ROOT : ret; } +/* +* This returns the actual value of the suid_dumpable flag. For things +* that are using this for checking for privilege transitions, it must +* test against SUID_DUMP_USER rather than treating it as a boolean +* value. +*/ int get_dumpable (struct mm_struct *mm) {return __get_dumpable (mm->flags);
include/linux/binfmts.h +0 -3
@@ -99,9 +99,6 @@ extern void setup_new_exec(struct linux_binprm * bprm);extern void would_dump (struct linux_binprm *,struct file *);extern int suid_dumpable; -#define SUID_DUMP_DISABLE 0/* No setuid dumping */ -#define SUID_DUMP_USER 1/* Dump as user of process */ -#define SUID_DUMP_ROOT 2/* Dump as root */ /* Stack area protections */ #define EXSTACK_DEFAULT 0/* Whatever the arch defaults to */
include/linux/sched.h +75 -7
115 lines not on this page · raw message
include/linux/thread_info.h +2 -0
@@ -107,6 +107,8 @@ static inline int test_ti_thread_flag(struct thread_info *ti, int flag)#define set_need_resched () set_thread_flag(TIF_NEED_RESCHED)#define clear_need_resched () clear_thread_flag(TIF_NEED_RESCHED) +#define tif_need_resched () test_thread_flag(TIF_NEED_RESCHED) +#if definedTIF_RESTORE_SIGMASK && !definedHAVE_SET_RESTORE_SIGMASK /* * An arch can define its own version of set_restore_sigmask() to get the
ipc/shm.c +29 -8
@@ -208,15 +208,18 @@ static void shm_open(struct vm_area_struct *vma)*/ static void shm_destroy (struct ipc_namespace *ns,struct shmid_kernel *shp) { +struct file *shm_file; + + shm_file = shp->shm_file; + shp->shm_file =NULL ; ns->shm_tot -= (shp->shm_segsz +PAGE_SIZE -1 ) >>PAGE_SHIFT ;shm_rmid (ns, shp);shm_unlock (shp); -if (!is_file_hugepages (shp->shm_file)) -shmem_lock (shp->shm_file,0 , shp->mlock_user); +if (!is_file_hugepages (shm_file)) +shmem_lock (shm_file,0 , shp->mlock_user);else if (shp->mlock_user) -user_shm_unlock (file_inode (shp->shm_file)->i_size, - shp->mlock_user); -fput (shp->shm_file); +user_shm_unlock (file_inode (shm_file)->i_size, shp->mlock_user); +fput (shm_file);ipc_rcu_putref (shp, shm_rcu_free); }
@@ -974,15 +977,25 @@ SYSCALL_DEFINE3(shmctl, int, shmid, int, cmd, struct shmid_ds __user *, buf)ipc_lock_object (&shp->shm_perm);if (!ns_capable (ns->user_ns,CAP_IPC_LOCK )) {kuid_t euid =current_euid (); - err = -EPERM ;if (!uid_eq (euid, shp->shm_perm.uid) && - !uid_eq (euid, shp->shm_perm.cuid)) + !uid_eq (euid, shp->shm_perm.cuid)) { + err = -EPERM ; goto out_unlock0; -if (cmd ==SHM_LOCK && !rlimit (RLIMIT_MEMLOCK )) + } +if (cmd ==SHM_LOCK && !rlimit (RLIMIT_MEMLOCK )) { + err = -EPERM ; goto out_unlock0; + } } shm_file = shp->shm_file; + +/* check if shm_destroy() is tearing down shp */ +if (shm_file ==NULL ) { + err = -EIDRM ; + goto out_unlock0; + } +if (is_file_hugepages (shm_file)) goto out_unlock0;
@@ -1101,6 +1114,14 @@ long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr, goto out_unlock;ipc_lock_object (&shp->shm_perm); + +/* check if shm_destroy() is tearing down shp */ +if (shp->shm_file ==NULL ) { +ipc_unlock_object (&shp->shm_perm); + err = -EIDRM ; + goto out_unlock; + } + path = shp->shm_file->f_path;path_get (&path); shp->shm_nattch++;
kernel/cpu/idle.c +4 -5
@@ -44,7 +44,7 @@ static inline int cpu_idle_poll(void)rcu_idle_enter ();trace_cpu_idle_rcuidle (0 ,smp_processor_id ());local_irq_enable (); -while (!need_resched ()) +while (!tif_need_resched ())cpu_relax ();trace_cpu_idle_rcuidle (PWR_EVENT_EXIT ,smp_processor_id ());rcu_idle_exit ();
@@ -92,8 +92,7 @@ static void cpu_idle_loop(void)if (cpu_idle_force_poll ||tick_check_broadcast_expired ()) {cpu_idle_poll (); }else { -current_clr_polling (); -if (!need_resched ()) { +if (!current_clr_polling_and_test ()) {stop_critical_timings ();rcu_idle_enter ();arch_cpu_idle ();
@@ -103,7 +102,7 @@ static void cpu_idle_loop(void) }else {local_irq_enable (); } -current_set_polling (); +__current_set_polling (); }arch_cpu_idle_exit (); }
@@ -129,7 +128,7 @@ void cpu_startup_entry(enum cpuhp_state state)*/ boot_init_stack_canary ();#endif -current_set_polling (); +__current_set_polling ();arch_cpu_idle_prepare ();cpu_idle_loop (); }
kernel/ptrace.c +2 -1
@@ -257,7 +257,8 @@ ok:if (task->mm) dumpable =get_dumpable (task->mm);rcu_read_lock (); -if (!dumpable && !ptrace_has_cap (__task_cred (task)->user_ns, mode)) { +if (dumpable !=SUID_DUMP_USER && + !ptrace_has_cap (__task_cred (task)->user_ns, mode)) {rcu_read_unlock ();return -EPERM ; }
kernel/trace/trace_event_perf.c +1 -1
@@ -26,7 +26,7 @@ static int perf_trace_event_perm(struct ftrace_event_call *tp_event, {/* The ftrace function trace is allowed only for root. */ if (ftrace_event_is_function (tp_event) && -perf_paranoid_kernel () && !capable (CAP_SYS_ADMIN )) +perf_paranoid_tracepoint_raw () && !capable (CAP_SYS_ADMIN ))return -EPERM ;/* No tracing, just counting, so no obvious leak */
net/sunrpc/clnt.c +1 -1
@@ -1423,9 +1423,9 @@ call_refreshresult(struct rpc_task *task)return ;case -ETIMEDOUT :rpc_delay (task,3 *HZ ); -case -EKEYEXPIRED :case -EAGAIN : status = -EACCES ; +case -EKEYEXPIRED :if (!task->tk_cred_retry)break ; task->tk_cred_retry--;
security/integrity/ima/ima_policy.c +0 -1
@@ -73,7 +73,6 @@ static struct ima_rule_entry default_rules[] = { {.action = DONT_MEASURE,.fsmagic = SYSFS_MAGIC,.flags = IMA_FSMAGIC}, {.action = DONT_MEASURE,.fsmagic = DEBUGFS_MAGIC,.flags = IMA_FSMAGIC}, {.action = DONT_MEASURE,.fsmagic = TMPFS_MAGIC,.flags = IMA_FSMAGIC}, - {.action = DONT_MEASURE,.fsmagic = RAMFS_MAGIC,.flags = IMA_FSMAGIC}, {.action = DONT_MEASURE,.fsmagic = DEVPTS_SUPER_MAGIC,.flags = IMA_FSMAGIC}, {.action = DONT_MEASURE,.fsmagic = BINFMTFS_MAGIC,.flags = IMA_FSMAGIC}, {.action = DONT_MEASURE,.fsmagic = SECURITYFS_MAGIC,.flags = IMA_FSMAGIC},