Linux 4.4.247
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.4.247 kernel.
All users of the 4.4 kernel series must upgrade.
The updated 4.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.4.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 - arch/x86/kernel/cpu/bugs.c | 4 +- arch/x86/xen/spinlock.c | 12 +++++++- drivers/dma/pl330.c | 2 - drivers/hid/hid-cypress.c | 44 ++++++++++++++++++++++++++---- drivers/hid/hid-ids.h | 2 + drivers/hid/hid-sensor-hub.c | 3 +- drivers/infiniband/hw/mthca/mthca_cq.c | 10 ++++-- drivers/input/serio/i8042.c | 12 +++++++- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 3 +- drivers/nfc/s3fwrn5/i2c.c | 4 +- drivers/scsi/libiscsi.c | 23 ++++++++++----- drivers/scsi/ufs/ufshcd.c | 6 ---- drivers/target/iscsi/iscsi_target.c | 17 ++++++++--- drivers/usb/core/config.c | 11 +++++++ drivers/usb/core/devio.c | 4 +- drivers/usb/core/quirks.c | 38 +++++++++++++++++++++++++ drivers/usb/core/usb.h | 3 ++ drivers/video/fbdev/hyperv_fb.c | 7 ++++ fs/btrfs/inode.c | 41 ++++++++++++++++++++++----- fs/btrfs/qgroup.c | 2 - fs/btrfs/tests/inode-tests.c | 1 fs/btrfs/volumes.c | 7 ++++ fs/efivarfs/inode.c | 2 + fs/efivarfs/super.c | 1 fs/proc/self.c | 7 ++++ include/linux/usb/quirks.h | 3 ++ include/scsi/libiscsi.h | 3 ++ tools/perf/util/dwarf-aux.c | 8 +++++ 29 files changed, 233 insertions(+), 49 deletions(-)
Alan Stern (2):
USB: core: Change %pK for __user pointers to %px
USB: core: Fix regression in Hercules audio card
Anand K Mistry (1):
x86/speculation: Fix prctl() when spectre_v2_user={seccomp,prctl},ibpb
Ard Biesheuvel (1):
efivarfs: revert "fix memory leak in efivarfs_create()"
Brian Masney (1):
x86/xen: don't unbind uninitialized lock_kicker_irq
Dexuan Cui (1):
video: hyperv_fb: Fix the cache type when mapping the VRAM
Filipe Manana (1):
btrfs: fix lockdep splat when reading qgroup config on mount
Frank Yang (1):
HID: cypress: Support Varmilo Keyboards' media hotkeys
Greg Kroah-Hartman (1):
Linux 4.4.247
Hans de Goede (1):
Input: i8042 - allow insmod to succeed on devices without an i8042 controller
Jens Axboe (1):
proc: don't allow async path resolution of /proc/self components
Johan Hovold (1):
USB: core: add endpoint-blacklist quirk
Krzysztof Kozlowski (1):
nfc: s3fwrn5: use signed integer for parsing GPIO numbers
Lee Duncan (1):
scsi: libiscsi: Fix NOP race condition
Masami Hiramatsu (1):
perf probe: Fix to die_entrypc() returns error correctly
Michael Chan (1):
bnxt_en: Release PCI regions when DMA mask setup fails during probe.
Mike Christie (1):
scsi: target: iscsi: Fix cmd abort fabric stop race
Pablo Ceballos (1):
HID: hid-sensor-hub: Fix issue with devices with no report ID
Qu Wenruo (2):
btrfs: tree-checker: Enhance chunk checker to validate chunk profile
btrfs: inode: Verify inode mode to avoid NULL pointer dereference
Stanley Chu (1):
scsi: ufs: Fix race between shutdown and runtime resume flow
Sugar Zhang (1):
dmaengine: pl330: _prep_dma_memcpy: Fix wrong burst size
Xiongfeng Wang (1):
IB/mthca: fix return value of error branch in mthca_init_cq()
Zhang Changzhong (1):
bnxt_en: fix error return code in bnxt_init_board()
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 246 +SUBLEVEL = 247 EXTRAVERSION = NAME = Blurry Fish Butt
arch/x86/kernel/cpu/bugs.c +2 -2
@@ -707,11 +707,13 @@ spectre_v2_user_select_mitigation(enum spectre_v2_mitigation_cmd v2_cmd)if (boot_cpu_has (X86_FEATURE_IBPB )) {setup_force_cpu_cap (X86_FEATURE_USE_IBPB ); + spectre_v2_user_ibpb = mode;switch (cmd) {case SPECTRE_V2_USER_CMD_FORCE :case SPECTRE_V2_USER_CMD_PRCTL_IBPB :case SPECTRE_V2_USER_CMD_SECCOMP_IBPB :static_branch_enable (&switch_mm_always_ibpb); + spectre_v2_user_ibpb =SPECTRE_V2_USER_STRICT ;break ;case SPECTRE_V2_USER_CMD_PRCTL :case SPECTRE_V2_USER_CMD_AUTO :
@@ -725,8 +727,6 @@ spectre_v2_user_select_mitigation(enum spectre_v2_mitigation_cmd v2_cmd)pr_info ("mitigation: Enabling %s Indirect Branch Prediction Barrier\n" ,static_key_enabled (&switch_mm_always_ibpb) ?"always-on" :"conditional" ); - - spectre_v2_user_ibpb = mode; }/*
arch/x86/xen/spinlock.c +11 -1
@@ -301,10 +301,20 @@ void xen_init_lock_cpu(int cpu)void xen_uninit_lock_cpu (int cpu) { +int irq; +if (!xen_pvspin)return ; -unbind_from_irqhandler (per_cpu (lock_kicker_irq, cpu),NULL ); +/* +* When booting the kernel with 'mitigations=auto,nosmt', the secondary +* CPUs are not activated, and lock_kicker_irq is not initialized. +*/ + irq =per_cpu (lock_kicker_irq, cpu); +if (irq ==-1 ) +return ; + +unbind_from_irqhandler (irq,NULL );per_cpu (lock_kicker_irq, cpu) =-1 ;kfree (per_cpu (irq_name, cpu));per_cpu (irq_name, cpu) =NULL ;
drivers/dma/pl330.c +1 -1
@@ -2634,7 +2634,7 @@ pl330_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dst,* If burst size is smaller than bus width then make sure we only * transfer one at a time to avoid a burst stradling an MFIFO entry. */ -if (desc->rqcfg.brst_size *8 < pl330->pcfg.data_bus_width) +if (burst *8 < pl330->pcfg.data_bus_width) desc->rqcfg.brst_len =1 ; desc->bytes_requested = len;
drivers/hid/hid-cypress.c +39 -5
70 lines not on this page · raw message
drivers/hid/hid-ids.h +2 -0
@@ -279,6 +279,8 @@#define USB_DEVICE_ID_CYPRESS_BARCODE_4 0xed81#define USB_DEVICE_ID_CYPRESS_TRUETOUCH 0xc001 +#define USB_DEVICE_ID_CYPRESS_VARMILO_VA104M_07B1 0X07b1 +#define USB_VENDOR_ID_DATA_MODUL 0x7374#define USB_VENDOR_ID_DATA_MODUL_EASYMAXTOUCH 0x1201
drivers/hid/hid-sensor-hub.c +2 -1
@@ -473,7 +473,8 @@ static int sensor_hub_raw_event(struct hid_device *hdev,return 1 ; ptr = raw_data; - ptr++;/* Skip report id */ +if (report->id) + ptr++;/* Skip report id */ spin_lock_irqsave (&pdata->lock, flags);
drivers/infiniband/hw/mthca/mthca_cq.c +6 -4
@@ -811,8 +811,10 @@ int mthca_init_cq(struct mthca_dev *dev, int nent, } mailbox =mthca_alloc_mailbox (dev,GFP_KERNEL ); -if (IS_ERR (mailbox)) +if (IS_ERR (mailbox)) { + err =PTR_ERR (mailbox); goto err_out_arm; + } cq_context = mailbox->buf;
@@ -854,9 +856,9 @@ int mthca_init_cq(struct mthca_dev *dev, int nent, }spin_lock_irq (&dev->cq_table.lock); -if (mthca_array_set (&dev->cq_table.cq, - cq->cqn & (dev->limits.num_cqs -1 ), - cq)) { + err =mthca_array_set (&dev->cq_table.cq, + cq->cqn & (dev->limits.num_cqs -1 ), cq); +if (err) {spin_unlock_irq (&dev->cq_table.lock); goto err_out_free_mr; }
drivers/input/serio/i8042.c +11 -1
@@ -125,6 +125,7 @@ module_param_named(unmask_kbd_data, i8042_unmask_kbd_data, bool, 0600);MODULE_PARM_DESC (unmask_kbd_data,"Unconditional enable (may reveal sensitive data) of normally sanitize-filtered kbd data traffic debug log [pre-condition: i8042.debug=1 enabled]" );#endif +static bool i8042_present;static bool i8042_bypass_aux_irq_test;static char i8042_kbd_firmware_id[128 ];static char i8042_aux_firmware_id[128 ];
@@ -343,6 +344,9 @@ int i8042_command(unsigned char *param, int command)unsigned long flags;int retval; +if (!i8042_present) +return -1 ; +spin_lock_irqsave (&i8042_lock, flags); retval =__i8042_command (param, command);spin_unlock_irqrestore (&i8042_lock, flags);
@@ -1597,12 +1601,15 @@ static int __init i8042_init(void) err =i8042_platform_init ();if (err) -return err; +return (err == -ENODEV ) ?0 : err; err =i8042_controller_check ();if (err) goto err_platform_exit; +/* Set this before creating the dev to allow i8042_command to work right away */ + i8042_present = true; + pdev =platform_create_bundle (&i8042_driver, i8042_probe,NULL ,0 ,NULL ,0 );if (IS_ERR (pdev)) { err =PTR_ERR (pdev);
@@ -1621,6 +1628,9 @@ static int __init i8042_init(void) static void __exit i8042_exit(void) { +if (!i8042_present) +return ; +platform_device_unregister (i8042_platform_device);platform_driver_unregister (&i8042_driver);i8042_platform_exit ();
drivers/net/ethernet/broadcom/bnxt/bnxt.c +2 -1
@@ -5198,7 +5198,8 @@ static int bnxt_init_board(struct pci_dev *pdev, struct net_device *dev)if (dma_set_mask_and_coherent (&pdev->dev,DMA_BIT_MASK (64 )) !=0 &&dma_set_mask_and_coherent (&pdev->dev,DMA_BIT_MASK (32 )) !=0 ) {dev_err (&pdev->dev,"System does not support DMA, aborting\n" ); - goto init_err_disable; + rc = -EIO ; + goto init_err_release; }pci_set_master (pdev);
drivers/nfc/s3fwrn5/i2c.c +2 -2
@@ -37,8 +37,8 @@ struct s3fwrn5_i2c_phy {struct i2c_client *i2c_dev;struct nci_dev *ndev; -unsigned int gpio_en; -unsigned int gpio_fw_wake; +int gpio_en; +int gpio_fw_wake;struct mutex mutex;
drivers/scsi/libiscsi.c +15 -8
@@ -570,8 +570,8 @@ static void iscsi_complete_task(struct iscsi_task *task, int state)if (conn->task == task) conn->task =NULL ; -if (conn->ping_task == task) - conn->ping_task =NULL ; +if (READ_ONCE (conn->ping_task) == task) +WRITE_ONCE (conn->ping_task,NULL );/* release get from queueing */ __iscsi_put_task (task);
@@ -780,6 +780,9 @@ __iscsi_conn_send_pdu(struct iscsi_conn *conn, struct iscsi_hdr *hdr, task->conn->session->age); } +if (unlikely (READ_ONCE (conn->ping_task) ==INVALID_SCSI_TASK )) +WRITE_ONCE (conn->ping_task, task); +if (!ihost->workq) {if (iscsi_prep_mgmt_task (conn, task)) goto free_task;
@@ -987,8 +990,11 @@ static int iscsi_send_nopout(struct iscsi_conn *conn, struct iscsi_nopin *rhdr)struct iscsi_nopout hdr;struct iscsi_task *task; -if (!rhdr && conn->ping_task) -return -EINVAL ; +if (!rhdr) { +if (READ_ONCE (conn->ping_task)) +return -EINVAL ; +WRITE_ONCE (conn->ping_task,INVALID_SCSI_TASK ); + }memset (&hdr,0 ,sizeof (struct iscsi_nopout )); hdr.opcode =ISCSI_OP_NOOP_OUT |ISCSI_OP_IMMEDIATE ;
@@ -1003,11 +1009,12 @@ static int iscsi_send_nopout(struct iscsi_conn *conn, struct iscsi_nopin *rhdr) task =__iscsi_conn_send_pdu (conn, (struct iscsi_hdr *)&hdr,NULL ,0 );if (!task) { +if (!rhdr) +WRITE_ONCE (conn->ping_task,NULL );iscsi_conn_printk (KERN_ERR , conn,"Could not send nopout\n" );return -EIO ; }else if (!rhdr) {/* only track our nops */ - conn->ping_task = task; conn->last_ping = jiffies; }
@@ -1020,7 +1027,7 @@ static int iscsi_nop_out_rsp(struct iscsi_task *task,struct iscsi_conn *conn = task->conn;int rc =0 ; -if (conn->ping_task != task) { +if (READ_ONCE (conn->ping_task) != task) {/* * If this is not in response to one of our * nops then it must be from userspace.
@@ -1960,7 +1967,7 @@ static void iscsi_start_tx(struct iscsi_conn *conn)*/ static int iscsi_has_ping_timed_out (struct iscsi_conn *conn) { -if (conn->ping_task && +if (READ_ONCE (conn->ping_task) &&time_before_eq (conn->last_recv + (conn->recv_timeout *HZ ) + (conn->ping_timeout *HZ ), jiffies))return 1 ;
@@ -2095,7 +2102,7 @@ static enum blk_eh_timer_return iscsi_eh_cmd_timed_out(struct scsi_cmnd *sc)* Checking the transport already or nop from a cmd timeout still * running */ -if (conn->ping_task) { +if (READ_ONCE (conn->ping_task)) { task->have_checked_conn = true; rc =BLK_EH_RESET_TIMER ; goto done;
drivers/scsi/ufs/ufshcd.c +1 -5
@@ -5387,11 +5387,7 @@ int ufshcd_shutdown(struct ufs_hba *hba)if (ufshcd_is_ufs_dev_poweroff (hba) &&ufshcd_is_link_off (hba)) goto out; -if (pm_runtime_suspended (hba->dev)) { - ret =ufshcd_runtime_resume (hba); -if (ret) - goto out; - } +pm_runtime_get_sync (hba->dev); ret =ufshcd_suspend (hba,UFS_SHUTDOWN_PM ); out:
drivers/target/iscsi/iscsi_target.c +13 -4
@@ -493,8 +493,7 @@ static void iscsit_aborted_task(struct iscsi_conn *conn, struct iscsi_cmd *cmd)bool scsi_cmd = (cmd->iscsi_opcode ==ISCSI_OP_SCSI_CMD );spin_lock_bh (&conn->cmd_lock); -if (!list_empty (&cmd->i_conn_node) && - !(cmd->se_cmd.transport_state &CMD_T_FABRIC_STOP )) +if (!list_empty (&cmd->i_conn_node))list_del_init (&cmd->i_conn_node);spin_unlock_bh (&conn->cmd_lock);
@@ -4228,12 +4227,22 @@ static void iscsit_release_commands_from_conn(struct iscsi_conn *conn)spin_lock_bh (&conn->cmd_lock);list_splice_init (&conn->conn_cmd_list, &tmp_list); -list_for_each_entry (cmd, &tmp_list, i_conn_node) { +list_for_each_entry_safe (cmd, cmd_tmp, &tmp_list, i_conn_node) {struct se_cmd *se_cmd = &cmd->se_cmd;if (se_cmd->se_tfo !=NULL ) {spin_lock_irq (&se_cmd->t_state_lock); - se_cmd->transport_state |=CMD_T_FABRIC_STOP ; +if (se_cmd->transport_state &CMD_T_ABORTED ) { +/* +* LIO's abort path owns the cleanup for this, +* so put it back on the list and let +* aborted_task handle it. +*/ +list_move_tail (&cmd->i_conn_node, + &conn->conn_cmd_list); + }else { + se_cmd->transport_state |=CMD_T_FABRIC_STOP ; + }spin_unlock_irq (&se_cmd->t_state_lock); } }
drivers/usb/core/config.c +11 -0
@@ -222,6 +222,7 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, struct usb_host_interface *ifp, int num_ep, unsigned char *buffer, int size) { + struct usb_device *udev = to_usb_device(ddev);unsigned char *buffer0 = buffer;struct usb_endpoint_descriptor *d;struct usb_host_endpoint *endpoint;
@@ -263,6 +264,16 @@ static int usb_parse_endpoint(struct device *ddev, int cfgno, goto skip_to_next_endpoint_or_interface_descriptor; } +/* Ignore blacklisted endpoints */ +if (udev->quirks &USB_QUIRK_ENDPOINT_BLACKLIST ) { +if (usb_endpoint_is_blacklisted (udev, ifp, d)) { +dev_warn (ddev,"config %d interface %d altsetting %d has a blacklisted endpoint with address 0x%X, skipping\n" , + cfgno, inum, asnum, + d->bEndpointAddress); + goto skip_to_next_endpoint_or_interface_descriptor; + } + } + endpoint = &ifp->endpoint[ifp->desc.bNumEndpoints]; ++ifp->desc.bNumEndpoints;
drivers/usb/core/devio.c +2 -2
@@ -369,11 +369,11 @@ static void snoop_urb(struct usb_device *udev,if (userurb) {/* Async */ if (when ==SUBMIT ) -dev_info (&udev->dev,"userurb %pK, ep%d %s-%s, " +dev_info (&udev->dev,"userurb %px, ep%d %s-%s, " "length %u\n" , userurb, ep, t, d, length);else -dev_info (&udev->dev,"userurb %pK, ep%d %s-%s, " +dev_info (&udev->dev,"userurb %px, ep%d %s-%s, " "actual_length %u status %d\n" , userurb, ep, t, d, length, timeout_or_status);
drivers/usb/core/quirks.c +38 -0
@@ -195,6 +195,10 @@ static const struct usb_device_id usb_quirk_list[] = {/* Guillemot Webcam Hercules Dualpix Exchange*/ { USB_DEVICE(0x06f8, 0x3005), .driver_info = USB_QUIRK_RESET_RESUME }, + /* Guillemot Hercules DJ Console audio card (BZ 208357) */ + { USB_DEVICE(0x06f8, 0xb000), .driver_info = + USB_QUIRK_ENDPOINT_BLACKLIST }, + /* Midiman M-Audio Keystation 88es */ { USB_DEVICE(0x0763, 0x0192), .driver_info = USB_QUIRK_RESET_RESUME },
@@ -344,6 +348,40 @@ static const struct usb_device_id usb_amd_resume_quirk_list[] = { { }/* terminating entry must be last */ }; +/* +* Entries for blacklisted endpoints that should be ignored when parsing +* configuration descriptors. +* +* Matched for devices with USB_QUIRK_ENDPOINT_BLACKLIST. +*/ +static const struct usb_device_id usb_endpoint_blacklist[] = { + {USB_DEVICE_INTERFACE_NUMBER (0x06f8 ,0xb000 ,5 ), .driver_info =0x01 }, + {USB_DEVICE_INTERFACE_NUMBER (0x06f8 ,0xb000 ,5 ), .driver_info =0x81 }, + { } +}; + +bool usb_endpoint_is_blacklisted (struct usb_device *udev, +struct usb_host_interface *intf, +struct usb_endpoint_descriptor *epd) +{ +const struct usb_device_id *id; +unsigned int address; + +for (id = usb_endpoint_blacklist; id->match_flags; ++id) { +if (!usb_match_device (udev, id)) +continue ; + +if (!usb_match_one_id_intf (udev, intf, id)) +continue ; + + address = id->driver_info; +if (address == epd->bEndpointAddress) +return true; + } + +return false; +} +static bool usb_match_any_interface (struct usb_device *udev,const struct usb_device_id *id) {
drivers/usb/core/usb.h +3 -0
@@ -31,6 +31,9 @@ extern void usb_deauthorize_interface(struct usb_interface *);extern void usb_authorize_interface (struct usb_interface *);extern void usb_detect_quirks (struct usb_device *udev);extern void usb_detect_interface_quirks (struct usb_device *udev); +extern bool usb_endpoint_is_blacklisted (struct usb_device *udev, +struct usb_host_interface *intf, +struct usb_endpoint_descriptor *epd);extern int usb_remove_device (struct usb_device *udev); extern int usb_get_device_descriptor(struct usb_device *dev,
drivers/video/fbdev/hyperv_fb.c +6 -1
@@ -712,7 +712,12 @@ static int hvfb_getmem(struct hv_device *hdev, struct fb_info *info) goto err1; } - fb_virt =ioremap (par->mem->start, screen_fb_size); +/* +* Map the VRAM cacheable for performance. This is also required for +* VM Connect to display properly for ARM64 Linux VM, as the host also +* maps the VRAM cacheable. +*/ + fb_virt =ioremap_cache (par->mem->start, screen_fb_size);if (!fb_virt) goto err2;
fs/btrfs/inode.c +33 -8
92 lines not on this page · raw message
fs/btrfs/qgroup.c +1 -1
@@ -462,6 +462,7 @@ next2:break ; } out: +btrfs_free_path (path); fs_info->qgroup_flags |= flags;if (!(fs_info->qgroup_flags &BTRFS_QGROUP_STATUS_FLAG_ON )) { fs_info->quota_enabled =0 ;
@@ -470,7 +471,6 @@ out: ret >= 0) { ret =qgroup_rescan_init (fs_info, rescan_progress,0 ); } -btrfs_free_path (path);if (ret <0 ) {ulist_free (fs_info->qgroup_ulist);
fs/btrfs/tests/inode-tests.c +1 -0
@@ -235,6 +235,7 @@ static noinline int test_btrfs_get_extent(void)return ret; } + inode->i_mode =S_IFREG ;BTRFS_I (inode)->location.type =BTRFS_INODE_ITEM_KEY ;BTRFS_I (inode)->location.objectid =BTRFS_FIRST_FREE_OBJECTID ;BTRFS_I (inode)->location.offset =0 ;
fs/btrfs/volumes.c +7 -0
@@ -6262,6 +6262,13 @@ static int btrfs_check_chunk_valid(struct btrfs_root *root,return -EIO ; } +if (!is_power_of_2 (type &BTRFS_BLOCK_GROUP_PROFILE_MASK ) && + (type &BTRFS_BLOCK_GROUP_PROFILE_MASK ) !=0 ) { +btrfs_err (root->fs_info, +"invalid chunk profile flag: 0x%llx, expect 0 or 1 bit set" , + type &BTRFS_BLOCK_GROUP_PROFILE_MASK ); +return -EUCLEAN ; + }if ((type &BTRFS_BLOCK_GROUP_TYPE_MASK ) ==0 ) {btrfs_err (root->fs_info,"missing chunk type flag: 0x%llx" , type);return -EIO ;
fs/efivarfs/inode.c +2 -0
@@ -10,6 +10,7 @@#include <linux/efi.h> #include <linux/fs.h> #include <linux/ctype.h> +#include <linux/kmemleak.h> #include <linux/slab.h> #include "internal.h"
@@ -138,6 +139,7 @@ static int efivarfs_create(struct inode *dir, struct dentry *dentry, var->var.VariableName[i] ='\0' ; inode->i_private = var; +kmemleak_ignore (var);efivar_entry_add (var, &efivarfs_list);d_instantiate (dentry, inode);
fs/efivarfs/super.c +0 -1
@@ -23,7 +23,6 @@ LIST_HEAD(efivarfs_list);static void efivarfs_evict_inode (struct inode *inode) {clear_inode (inode); -kfree (inode->i_private); }static const struct super_operations efivarfs_ops = {
fs/proc/self.c +7 -0
@@ -24,6 +24,13 @@ static const char *proc_self_follow_link(struct dentry *dentry, void **cookie)pid_t tgid =task_tgid_nr_ns (current, ns);char *name; +/* +* Not currently supported. Once we can inherit all of struct pid, +* we can allow this. +*/ +if (current->flags &PF_KTHREAD ) +return ERR_PTR (-EOPNOTSUPP ); +if (!tgid)return ERR_PTR (-ENOENT );/* 11 for max length of signed int in decimal + NULL term */
include/linux/usb/quirks.h +3 -0
@@ -59,4 +59,7 @@/* Device needs a pause after every control message. */ #define USB_QUIRK_DELAY_CTRL_MSG BIT(13) +/* device has blacklisted endpoints */ +#define USB_QUIRK_ENDPOINT_BLACKLIST BIT(15) +#endif /* __LINUX_USB_QUIRKS_H */
include/scsi/libiscsi.h +3 -0
@@ -144,6 +144,9 @@ struct iscsi_task {void *dd_data;/* driver/transport data */ }; +/* invalid scsi_task pointer */ +#define INVALID_SCSI_TASK (struct iscsi_task *)-1l +static inline int iscsi_task_has_unsol_data (struct iscsi_task *task) {return task->unsol_r2t.data_length > task->unsol_r2t.sent;
tools/perf/util/dwarf-aux.c +8 -0
@@ -305,6 +305,7 @@ bool die_is_func_def(Dwarf_Die *dw_die)int die_entrypc (Dwarf_Die *dw_die,Dwarf_Addr *addr) {Dwarf_Addr base, end; +Dwarf_Attribute attr;if (!addr)return -EINVAL ;
@@ -312,6 +313,13 @@ int die_entrypc(Dwarf_Die *dw_die, Dwarf_Addr *addr)if (dwarf_entrypc (dw_die, addr) ==0 )return 0 ; +/* +* Since the dwarf_ranges() will return 0 if there is no +* DW_AT_ranges attribute, we should check it first. +*/ +if (!dwarf_attr (dw_die, DW_AT_ranges, &attr)) +return -ENOENT ; +return dwarf_ranges (dw_die,0 , &base, addr, &end) <0 ? -ENOENT :0 ; }