Linux 3.18.70
Greg KH
maintainerI'm announcing the release of the 3.18.70 kernel.
All users of the 3.18 kernel series must upgrade.
The updated 3.18.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.18.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 - drivers/gpu/drm/ttm/ttm_page_alloc.c | 2 - drivers/i2c/busses/i2c-ismt.c | 6 +++-- drivers/net/wireless/ti/wl1251/main.c | 1 fs/cifs/dir.c | 2 - fs/cifs/smb2pdu.h | 4 +-- fs/eventpoll.c | 37 ++++++++++++++++++++++------------ include/asm-generic/topology.h | 6 ++++- net/xfrm/xfrm_policy.c | 6 +++++ 9 files changed, 45 insertions(+), 21 deletions(-)
Cong Wang (1):
wl1251: add a missing spin_lock_init()
Greg Kroah-Hartman (1):
Linux 3.18.70
Oleg Nesterov (1):
epoll: fix race between ep_poll_callback(POLLFREE) and ep_free()/ep_remove()
Pavel Shilovsky (1):
CIFS: Fix maximum SMB2 header size
Stephen Douthit (2):
i2c: ismt: Don't duplicate the receive length for block reads
i2c: ismt: Return EMSGSIZE for block reads with bogus length
Steve French (1):
CIFS: remove endian related sparse warning
Tejun Heo (1):
cpumask: fix spurious cpumask_of_node() on non-NUMA multi-node configs
Vladis Dronov (1):
xfrm: policy: check policy direction value
Xiangliang.Yu (1):
drm/ttm: Fix accounting error when fail to get pages for pool
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 18 -SUBLEVEL = 69 +SUBLEVEL = 70 EXTRAVERSION = NAME = Diseased Newt
drivers/gpu/drm/ttm/ttm_page_alloc.c +1 -1
@@ -612,7 +612,7 @@ static void ttm_page_pool_fill_locked(struct ttm_page_pool *pool, }else {pr_err ("Failed to fill pool (%p)\n" , pool);/* If we have any pages left put them to the pool. */ -list_for_each_entry (p, &pool->list, lru) { +list_for_each_entry (p, &new_pages, lru) { ++cpages; }list_splice (&new_pages, &pool->list);
drivers/i2c/busses/i2c-ismt.c +4 -2
@@ -340,8 +340,10 @@ static int ismt_process_desc(const struct ismt_desc *desc,break ;case I2C_SMBUS_BLOCK_DATA :case I2C_SMBUS_I2C_BLOCK_DATA : -memcpy (&data->block[1 ], dma_buffer, desc->rxbytes); - data->block[0 ] = desc->rxbytes; +if (desc->rxbytes != dma_buffer[0 ] +1 ) +return -EMSGSIZE ; + +memcpy (data->block, dma_buffer, desc->rxbytes);break ; }return 0 ;
drivers/net/wireless/ti/wl1251/main.c +1 -0
@@ -1572,6 +1572,7 @@ struct ieee80211_hw *wl1251_alloc_hw(void) wl->state =WL1251_STATE_OFF ;mutex_init (&wl->mutex); +spin_lock_init (&wl->wl_lock); wl->tx_mgmt_frm_rate =DEFAULT_HW_GEN_TX_RATE ; wl->tx_mgmt_frm_mod =DEFAULT_HW_GEN_MODULATION_TYPE ;
fs/cifs/dir.c +1 -1
@@ -194,7 +194,7 @@ check_name(struct dentry *direntry, struct cifs_tcon *tcon)int i;if (unlikely (direntry->d_name.len > - tcon->fsAttrInfo.MaxPathNameComponentLength)) +le32_to_cpu (tcon->fsAttrInfo.MaxPathNameComponentLength)))return -ENAMETOOLONG ;if (!(cifs_sb->mnt_cifs_flags &CIFS_MOUNT_POSIX_PATHS )) {
fs/cifs/smb2pdu.h +2 -2
@@ -82,8 +82,8 @@#define NUMBER_OF_SMB2_COMMANDS 0x0013 -/* BB FIXME - analyze following length BB */ -#define MAX_SMB2_HDR_SIZE 0x78/* 4 len + 64 hdr + (2*24 wct) + 2 bct + 2 pad */ +/* 4 len + 52 transform hdr + 64 hdr + 56 create rsp */ +#define MAX_SMB2_HDR_SIZE 0x00b0#define SMB2_PROTO_NUMBER __constant_cpu_to_le32(0x424d53fe)
fs/eventpoll.c +24 -13
@@ -518,8 +518,13 @@ static void ep_remove_wait_queue(struct eppoll_entry *pwq)wait_queue_head_t *whead;rcu_read_lock (); -/* If it is cleared by POLLFREE, it should be rcu-safe */ - whead =rcu_dereference (pwq->whead); +/* +* If it is cleared by POLLFREE, it should be rcu-safe. +* If we read NULL we need a barrier paired with +* smp_store_release() in ep_poll_callback(), otherwise +* we rely on whead->lock. +*/ + whead =smp_load_acquire (&pwq->whead);if (whead)remove_wait_queue (whead, &pwq->wait);rcu_read_unlock ();
@@ -1006,17 +1011,6 @@ static int ep_poll_callback(wait_queue_t *wait, unsigned mode, int sync, void *kstruct epitem *epi =ep_item_from_wait (wait);struct eventpoll *ep = epi->ep; -if ((unsigned long )key &POLLFREE ) { -ep_pwq_from_wait (wait)->whead =NULL ; -/* -* whead = NULL above can race with ep_remove_wait_queue() -* which can do another remove_wait_queue() after us, so we -* can't use __remove_wait_queue(). whead->lock is held by -* the caller. -*/ -list_del_init (&wait->task_list); - } -spin_lock_irqsave (&ep->lock, flags);/*
@@ -1081,6 +1075,23 @@ out_unlock:if (pwake)ep_poll_safewake (&ep->poll_wait); + +if ((unsigned long )key &POLLFREE ) { +/* +* If we race with ep_remove_wait_queue() it can miss +* ->whead = NULL and do another remove_wait_queue() after +* us, so we can't use __remove_wait_queue(). +*/ +list_del_init (&wait->task_list); +/* +* ->whead != NULL protects us from the race with ep_free() +* or ep_remove(), ep_remove_wait_queue() takes whead->lock +* held by the caller. Once we nullify it, nothing protects +* ep/epi or even wait. +*/ +smp_store_release (&ep_pwq_from_wait (wait)->whead,NULL ); + } +return 1 ; }
include/asm-generic/topology.h +5 -1
@@ -48,7 +48,11 @@#define parent_node (node) ((void)(node),0)#endif #ifndef cpumask_of_node -#define cpumask_of_node (node) ((void)node, cpu_online_mask) +#ifdef CONFIG_NEED_MULTIPLE_NODES +#define cpumask_of_node (node) ((node) == 0 ? cpu_online_mask : cpu_none_mask) +#else +#define cpumask_of_node (node) ((void)node, cpu_online_mask) +#endif #endif #ifndef pcibus_to_node#define pcibus_to_node (bus) ((void)(bus), -1)
net/xfrm/xfrm_policy.c +6 -0
@@ -3248,9 +3248,15 @@ int xfrm_migrate(const struct xfrm_selector *sel, u8 dir, u8 type,struct xfrm_state *x_new[XFRM_MAX_DEPTH ];struct xfrm_migrate *mp; +/* Stage 0 - sanity checks */ if ((err =xfrm_migrate_check (m, num_migrate)) <0 ) goto out; +if (dir >=XFRM_POLICY_MAX ) { + err = -EINVAL ; + goto out; + } +/* Stage 1 - find policy */ if ((pol =xfrm_migrate_policy_find (sel, dir, type, net)) ==NULL ) { err = -ENOENT ;