Linux 3.18.79
Greg KH
maintainerI'm announcing the release of the 3.18.79 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/input/tablet/gtco.c | 17 +++++++------ drivers/net/can/usb/kvaser_usb.c | 3 +- drivers/s390/scsi/zfcp_aux.c | 5 +++ drivers/s390/scsi/zfcp_erp.c | 18 ++++++++----- drivers/s390/scsi/zfcp_scsi.c | 5 +++ drivers/scsi/sg.c | 2 - drivers/usb/host/xhci-hub.c | 22 +++++++++++++--- fs/ceph/caps.c | 5 +++ fs/ecryptfs/ecryptfs_kernel.h | 25 +++++++++++++------ fs/ecryptfs/keystore.c | 9 ++++++ fs/fuse/dir.c | 3 +- include/uapi/linux/spi/spidev.h | 1 lib/assoc_array.c | 51 +++++++++++++-------------------------- 14 files changed, 101 insertions(+), 67 deletions(-)
Baruch Siach (1):
spi: uapi: spidev: add missing ioctl header
Ben Hutchings (1):
scsi: sg: Re-fix off by one in sg_fill_request_table()
David Howells (1):
assoc_array: Fix a buggy node-splitting case
Dmitry Torokhov (1):
Input: gtco - fix potential out-of-bound access
Eric Biggers (1):
ecryptfs: fix dereference of NULL user_key_payload
Greg Kroah-Hartman (1):
Linux 3.18.79
Jeff Layton (1):
ceph: unlock dangling spinlock in try_flush_caps()
Jimmy Assarsson (1):
can: kvaser_usb: Correct return value in printout
Mayank Rana (1):
usb: xhci: Handle error condition in xhci_stop_device()
Miklos Szeredi (1):
fuse: fix READDIRPLUS skipping an entry
Steffen Maier (1):
scsi: zfcp: fix erp_action use-before-initialize in REC action trace
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 18 -SUBLEVEL = 78 +SUBLEVEL = 79 EXTRAVERSION = NAME = Diseased Newt
drivers/input/tablet/gtco.c +10 -7
@@ -231,13 +231,17 @@ static void parse_hid_report_descriptor(struct gtco *device, char * report,/* Walk this report and pull out the info we need */ while (i < length) { - prefix = report[i]; - -/* Skip over prefix */ - i++; + prefix = report[i++];/* Determine data size and save the data in the proper variable */ - size =PREF_SIZE (prefix); + size = (1U <<PREF_SIZE (prefix)) >>1 ; +if (i + size > length) { +dev_err (ddev, +"Not enough data (need %d, have %d)\n" , + i + size, length); +break ; + } +switch (size) {case 1 : data = report[i];
@@ -245,8 +249,7 @@ static void parse_hid_report_descriptor(struct gtco *device, char * report,case 2 : data16 =get_unaligned_le16 (&report[i]);break ; -case 3 : - size =4 ; +case 4 : data32 =get_unaligned_le32 (&report[i]);break ; }
drivers/net/can/usb/kvaser_usb.c +2 -1
@@ -1251,7 +1251,8 @@ static int kvaser_usb_close(struct net_device *netdev)if (err)netdev_warn (netdev,"Cannot flush queue, error %d\n" , err); -if (kvaser_usb_send_simple_msg (dev,CMD_RESET_CHIP , priv->channel)) + err =kvaser_usb_send_simple_msg (dev,CMD_RESET_CHIP , priv->channel); +if (err)netdev_warn (netdev,"Cannot reset card, error %d\n" , err); err =kvaser_usb_stop_chip (priv);
drivers/s390/scsi/zfcp_aux.c +5 -0
@@ -356,6 +356,8 @@ struct zfcp_adapter *zfcp_adapter_enqueue(struct ccw_device *ccw_device)INIT_WORK (&adapter->scan_work, zfcp_fc_scan_ports);INIT_WORK (&adapter->ns_up_work, zfcp_fc_sym_name_update); + adapter->erp_action.adapter = adapter; +if (zfcp_qdio_setup (adapter)) goto failed;
@@ -512,6 +514,9 @@ struct zfcp_port *zfcp_port_enqueue(struct zfcp_adapter *adapter, u64 wwpn, port->dev.groups = zfcp_port_attr_groups; port->dev.release = zfcp_port_release; + port->erp_action.adapter = adapter; + port->erp_action.port = port; +if (dev_set_name (&port->dev,"0x%016llx" , (unsigned long long )wwpn)) {kfree (port); goto err_out;
drivers/s390/scsi/zfcp_erp.c +11 -7
@@ -193,9 +193,8 @@ static struct zfcp_erp_action *zfcp_erp_setup_act(int need, u32 act_status,atomic_set_mask (ZFCP_STATUS_COMMON_ERP_INUSE , &zfcp_sdev->status); erp_action = &zfcp_sdev->erp_action; -memset (erp_action,0 ,sizeof (struct zfcp_erp_action )); - erp_action->port = port; - erp_action->sdev = sdev; +WARN_ON_ONCE (erp_action->port != port); +WARN_ON_ONCE (erp_action->sdev != sdev);if (!(atomic_read (&zfcp_sdev->status) &ZFCP_STATUS_COMMON_RUNNING )) act_status |=ZFCP_STATUS_ERP_CLOSE_ONLY ;
@@ -208,8 +207,8 @@ static struct zfcp_erp_action *zfcp_erp_setup_act(int need, u32 act_status,zfcp_erp_action_dismiss_port (port);atomic_set_mask (ZFCP_STATUS_COMMON_ERP_INUSE , &port->status); erp_action = &port->erp_action; -memset (erp_action,0 ,sizeof (struct zfcp_erp_action )); - erp_action->port = port; +WARN_ON_ONCE (erp_action->port != port); +WARN_ON_ONCE (erp_action->sdev !=NULL );if (!(atomic_read (&port->status) &ZFCP_STATUS_COMMON_RUNNING )) act_status |=ZFCP_STATUS_ERP_CLOSE_ONLY ;break ;
@@ -219,7 +218,8 @@ static struct zfcp_erp_action *zfcp_erp_setup_act(int need, u32 act_status,zfcp_erp_action_dismiss_adapter (adapter);atomic_set_mask (ZFCP_STATUS_COMMON_ERP_INUSE , &adapter->status); erp_action = &adapter->erp_action; -memset (erp_action,0 ,sizeof (struct zfcp_erp_action )); +WARN_ON_ONCE (erp_action->port !=NULL ); +WARN_ON_ONCE (erp_action->sdev !=NULL );if (!(atomic_read (&adapter->status) &ZFCP_STATUS_COMMON_RUNNING )) act_status |=ZFCP_STATUS_ERP_CLOSE_ONLY ;
@@ -229,7 +229,11 @@ static struct zfcp_erp_action *zfcp_erp_setup_act(int need, u32 act_status,return NULL ; } - erp_action->adapter = adapter; +WARN_ON_ONCE (erp_action->adapter != adapter); +memset (&erp_action->list,0 ,sizeof (erp_action->list)); +memset (&erp_action->timer,0 ,sizeof (erp_action->timer)); + erp_action->step =ZFCP_ERP_STEP_UNINITIALIZED ; + erp_action->fsf_req_id =0 ; erp_action->action = need; erp_action->status = act_status;
drivers/s390/scsi/zfcp_scsi.c +5 -0
@@ -138,10 +138,15 @@ static int zfcp_scsi_slave_alloc(struct scsi_device *sdev)struct zfcp_unit *unit;int npiv = adapter->connection_features &FSF_FEATURE_NPIV_MODE ; + zfcp_sdev->erp_action.adapter = adapter; + zfcp_sdev->erp_action.sdev = sdev; + port =zfcp_get_port_by_wwpn (adapter, rport->port_name);if (!port)return -ENXIO ; + zfcp_sdev->erp_action.port = port; + unit =zfcp_unit_find (port,zfcp_scsi_dev_lun (sdev));if (unit)put_device (&unit->dev);
drivers/scsi/sg.c +1 -1
@@ -863,7 +863,7 @@ sg_fill_request_table(Sg_fd *sfp, sg_req_info_t *rinfo) val =0 ;list_for_each_entry (srp, &sfp->rq_list, entry) { -if (val >SG_MAX_QUEUE ) +if (val >=SG_MAX_QUEUE )break ; rinfo[val].req_state = srp->done +1 ; rinfo[val].problem =
drivers/usb/host/xhci-hub.c +17 -5
@@ -293,15 +293,25 @@ static int xhci_stop_device(struct xhci_hcd *xhci, int slot_id, int suspend) GFP_NOWAIT);if (!command) {spin_unlock_irqrestore (&xhci->lock, flags); -xhci_free_command (xhci, cmd); -return -ENOMEM ; + ret = -ENOMEM ; + goto cmd_cleanup; + } + ret =xhci_queue_stop_endpoint (xhci, command, slot_id, + i, suspend); +if (ret) { +spin_unlock_irqrestore (&xhci->lock, flags); +xhci_free_command (xhci, command); + goto cmd_cleanup; } -xhci_queue_stop_endpoint (xhci, command, slot_id, i, - suspend); } } -xhci_queue_stop_endpoint (xhci, cmd, slot_id,0 , suspend); + ret =xhci_queue_stop_endpoint (xhci, cmd, slot_id,0 , suspend); +if (ret) { +spin_unlock_irqrestore (&xhci->lock, flags); + goto cmd_cleanup; + } +xhci_ring_cmd_db (xhci);spin_unlock_irqrestore (&xhci->lock, flags);
@@ -312,6 +322,8 @@ static int xhci_stop_device(struct xhci_hcd *xhci, int slot_id, int suspend)xhci_warn (xhci,"Timeout while waiting for stop endpoint command\n" ); ret = -ETIME ; } + +cmd_cleanup:xhci_free_command (xhci, cmd);return ret; }
fs/ceph/caps.c +4 -1
@@ -1748,6 +1748,7 @@ static int try_flush_caps(struct inode *inode, unsigned *flush_tid) retry:spin_lock (&ci->i_ceph_lock);if (ci->i_ceph_flags &CEPH_I_NOFLUSH ) { +spin_unlock (&ci->i_ceph_lock);dout ("try_flush_caps skipping %p I_NOFLUSH set\n" , inode); goto out; }
@@ -1765,8 +1766,10 @@ retry:mutex_lock (&session->s_mutex); goto retry; } -if (cap->session->s_state <CEPH_MDS_SESSION_OPEN ) +if (cap->session->s_state <CEPH_MDS_SESSION_OPEN ) { +spin_unlock (&ci->i_ceph_lock); goto out; + } flushing =__mark_caps_flushing (inode, session);
fs/ecryptfs/ecryptfs_kernel.h +17 -8
@@ -84,11 +84,16 @@ struct ecryptfs_page_crypt_context {static inline struct ecryptfs_auth_tok *ecryptfs_get_encrypted_key_payload_data (struct key *key) { -if (key->type == &key_type_encrypted) -return (struct ecryptfs_auth_tok *) - (&((struct encrypted_key_payload *)key->payload.data)->payload_data); -else +struct encrypted_key_payload *payload; + +if (key->type != &key_type_encrypted)return NULL ; + + payload = key->payload.data; +if (!payload) +return ERR_PTR (-EKEYREVOKED ); + +return (struct ecryptfs_auth_tok *)payload->payload_data; }static inline struct key *ecryptfs_get_encrypted_key (char *sig)
@@ -114,13 +119,17 @@ static inline struct ecryptfs_auth_tok * ecryptfs_get_key_payload_data(struct key *key) {struct ecryptfs_auth_tok *auth_tok; +struct user_key_payload *ukp; auth_tok =ecryptfs_get_encrypted_key_payload_data (key); -if (!auth_tok) -return (struct ecryptfs_auth_tok *) - (((struct user_key_payload *)key->payload.data)->data); -else +if (auth_tok)return auth_tok; + + ukp = key->payload.data; +if (!ukp) +return ERR_PTR (-EKEYREVOKED ); + +return (struct ecryptfs_auth_tok *)ukp->data; }#define ECRYPTFS_MAX_KEYSET_SIZE 1024
fs/ecryptfs/keystore.c +8 -1
@@ -458,7 +458,8 @@ out:* @auth_tok_key: key containing the authentication token * @auth_tok: authentication token * -* Returns zero on valid auth tok; -EINVAL otherwise +* Returns zero on valid auth tok; -EINVAL if the payload is invalid; or +* -EKEYREVOKED if the key was revoked before we acquired its semaphore. */ static int ecryptfs_verify_auth_tok_from_key(struct key *auth_tok_key,
@@ -467,6 +468,12 @@ ecryptfs_verify_auth_tok_from_key(struct key *auth_tok_key,int rc =0 ; (*auth_tok) =ecryptfs_get_key_payload_data (auth_tok_key); +if (IS_ERR (*auth_tok)) { + rc =PTR_ERR (*auth_tok); + *auth_tok =NULL ; + goto out; + } +if (ecryptfs_verify_version ((*auth_tok)->version)) {printk (KERN_ERR "Data structure version mismatch. Userspace " "tools must match eCryptfs kernel module with major "
fs/fuse/dir.c +2 -1
@@ -1371,7 +1371,8 @@ static int parse_dirplusfile(char *buf, size_t nbytes, struct file *file,*/ over = !dir_emit (ctx, dirent->name, dirent->namelen, dirent->ino, dirent->type); - ctx->pos = dirent->off; +if (!over) + ctx->pos = dirent->off; } buf += reclen;
include/uapi/linux/spi/spidev.h +1 -0
@@ -23,6 +23,7 @@#define SPIDEV_H #include <linux/types.h> +#include <linux/ioctl.h> /* User space versions of kernel symbols for SPI clocking modes, * matching <linux/spi/spi.h>
lib/assoc_array.c +17 -34
71 lines not on this page · raw message