Linux 4.4.236
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.4.236 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
------------
Documentation/filesystems/affs.txt | 16 + Makefile | 2 arch/s390/include/asm/percpu.h | 28 +-- drivers/dma/at_hdmac.c | 2 drivers/dma/of-dma.c | 8 drivers/dma/pl330.c | 2 drivers/hid/hid-core.c | 15 + drivers/hid/hid-input.c | 4 drivers/hid/hid-multitouch.c | 2 drivers/hwmon/applesmc.c | 31 +-- drivers/iommu/intel_irq_remapping.c | 10 - drivers/md/dm-cache-metadata.c | 8 drivers/md/dm-thin-metadata.c | 8 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 11 - drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 3 drivers/net/ethernet/broadcom/tg3.c | 17 + drivers/net/ethernet/mellanox/mlx4/mr.c | 2 drivers/net/ethernet/renesas/ravb_main.c | 110 +++++------ drivers/net/usb/asix_common.c | 2 drivers/net/usb/dm9601.c | 4 drivers/net/usb/qmi_wwan.c | 185 +++++++++++++++++++- drivers/thermal/ti-soc-thermal/omap4-thermal-data.c | 23 +- drivers/thermal/ti-soc-thermal/omap4xxx-bandgap.h | 10 - drivers/xen/xenbus/xenbus_client.c | 10 - fs/affs/amigaffs.c | 63 ++++-- fs/affs/file.c | 26 ++ fs/btrfs/ctree.c | 8 fs/btrfs/extent_io.c | 8 fs/btrfs/extent_io.h | 6 fs/btrfs/ioctl.c | 27 ++ fs/btrfs/volumes.c | 3 fs/ceph/file.c | 1 fs/eventpoll.c | 6 include/linux/hid.h | 42 +++- include/linux/log2.h | 2 include/linux/uaccess.h | 26 ++ include/net/inet_connection_sock.h | 4 include/net/netfilter/nf_tables.h | 2 include/uapi/linux/netfilter/nf_tables.h | 2 mm/hugetlb.c | 26 ++ mm/maccess.c | 167 ++++++++++++++++-- mm/page_alloc.c | 7 net/batman-adv/bridge_loop_avoidance.c | 5 net/batman-adv/gateway_client.c | 6 net/core/dev.c | 3 net/core/netpoll.c | 2 net/ipv4/inet_connection_sock.c | 46 +++- net/ipv4/inet_hashtables.c | 1 net/netfilter/nft_payload.c | 4 net/sctp/socket.c | 16 - net/wireless/reg.c | 3 scripts/checkpatch.pl | 4 sound/core/oss/mulaw.c | 4 sound/firewire/digi00x/digi00x.c | 18 + sound/firewire/digi00x/digi00x.h | 1 sound/firewire/tascam/tascam.c | 30 +++ sound/pci/ca0106/ca0106_main.c | 3 tools/perf/Documentation/perf-record.txt | 4 tools/perf/Documentation/perf-stat.txt | 4 59 files changed, 840 insertions(+), 253 deletions(-)
Al Viro (1):
fix regression in "epoll: Keep a reference on files added to the check list"
Bjørn Mork (5):
net: qmi_wwan: MDM9x30 specific power management
net: qmi_wwan: support "raw IP" mode
net: qmi_wwan: should hold RTNL while changing netdev type
net: qmi_wwan: ignore bogus CDC Union descriptors
qmi_wwan: add support for Quectel EC21 and EC25
Daniel Borkmann (1):
uaccess: Add non-pagefault user-space write function
Daniele Palmas (4):
NET: usb: qmi_wwan: add support for Telit LE922A PID 0x1040
drivers: net: usb: qmi_wwan: add QMI_QUIRK_SET_DTR for Telit PID 0x1201
net: usb: qmi_wwan: add Telit ME910 support
net: usb: qmi_wwan: add Telit 0x1050 compositionFabian Frederick (1):
fs/affs: use octal for permissions
Florian Westphal (1):
netfilter: nf_tables: fix destination register zeroing
Greg Kroah-Hartman (1):
Linux 4.4.236
Himadri Pandya (1):
net: usb: Fix uninit-was-stored issue in asix_read_phy_addr()
Jakub Kicinski (2):
bnxt: don't enable NAPI until rings are ready
net: disable netpoll on fresh napis
Jason Gunthorpe (1):
include/linux/log2.h: add missing () around n in roundup_pow_of_two()
Jeff Layton (1):
ceph: don't allow setlease on cephfs
Johannes Berg (1):
cfg80211: regulatory: reject invalid hints
Josef Bacik (3):
btrfs: drop path before adding new uuid tree entry
btrfs: set the lockdep class for log tree extent buffers
btrfs: fix potential deadlock in the search ioctl
Jussi Kivilinna (1):
batman-adv: bla: use netif_rx_ni when not in interrupt context
Kamil Lorenc (1):
net: usb: dm9601: Add USB ID of Keenetic Plus DSL
Kim Phillips (1):
perf record/stat: Explicitly call out event modifiers in the documentation
Lu Baolu (1):
iommu/vt-d: Serialize IOMMU GCMD register modifications
Marc Zyngier (2):
HID: core: Correctly handle ReportSize being zero
HID: core: Sanitize event code and type when mapping input
Marek Szyprowski (1):
dmaengine: pl330: Fix burst length if burst size is smaller than bus width
Masami Hiramatsu (1):
uaccess: Add non-pagefault user-space read functions
Max Staudt (1):
affs: fix basic permission bits to actually work
Mel Gorman (1):
mm, page_alloc: remove unnecessary variable from free_pcppages_bulk
Michael Chan (2):
tg3: Fix soft lockup when tg3_reset_task() fails.
bnxt_en: Failure to update PHY is not fatal condition.
Mrinal Pandey (1):
checkpatch: fix the usage of capture group ( ... )
Muchun Song (1):
mm/hugetlb: fix a race between hugetlb sysctl handlers
Nikolay Borisov (2):
btrfs: Remove redundant extent_buffer_get in get_old_root
btrfs: Remove extraneous extent_buffer_get from tree_mod_log_rewind
Pablo Neira Ayuso (1):
netfilter: nf_tables: incorrect enum nft_list_attributes definition
Patrik Halfar (1):
Add Dell Wireless 5809e Gobi 4G HSPA+ Mobile Broadband Card (rev3) to qmi_wwan
Peter Ujfalusi (1):
dmaengine: of-dma: Fix of_dma_router_xlate's of_dma_xlate handling
Rogan Dawes (1):
usb: qmi_wwan: add D-Link DWM-222 A2 device ID
Schemmel Hans-Christoph (1):
qmi_wwan: Added support for Gemalto's Cinterion PHxx WWAN interface
Shung-Hsi Yu (1):
net: ethernet: mlx4: Fix memory allocation in mlx4_buddy_init()
Simon Leiner (1):
xen/xenbus: Fix granting of vmalloc'd memory
Sven Eckelmann (1):
batman-adv: Avoid uninitialized chaddr when handling DHCP
Sven Schnelle (1):
s390: don't trace preemption in percpu macros
Takashi Iwai (1):
ALSA: pcm: oss: Remove superfluous WARN_ON() for mulaw sanity check
Takashi Sakamoto (3):
ALSA: firewire-digi00x: add support for console models of Digi00x series
ALSA: firewire-digi00x: exclude Avid Adrenaline from detection
ALSA; firewire-tascam: exclude Tascam FE-8 from detectionTim Froidcoeur (2):
net: refactor bind_bucket fastreuse into helper
net: initialize fastreuse on inet_inherit_port
Tom Rix (1):
hwmon: (applesmc) check status earlier.
Tong Zhang (1):
ALSA: ca0106: fix error code handling
Tony Lindgren (1):
thermal: ti-soc-thermal: Fix bogus thermal shutdowns for omap4430
Vasundhara Volam (1):
bnxt_en: Check for zero dir entries in NVRAM.
Xin Long (1):
sctp: not disable bh in the whole sctp_get_port_local()
Ye Bin (2):
dm cache metadata: Avoid returning cmd->bm wild pointer on error
dm thin metadata: Avoid returning cmd->bm wild pointer on errorYu Kuai (1):
dmaengine: at_hdmac: check return value of of_find_device_by_node() in at_dma_xlate()
Yuusuke Ashizuka (1):
ravb: Fixed to be able to unload modules
Greg Kroah-Hartman
maintainerDocumentation/filesystems/affs.txt +10 -6
@@ -93,13 +93,15 @@ The Amiga protection flags RWEDRWEDHSPARWED are handled as follows: - R maps to r for user, group and others. On directories, R implies x. - - If both W and D are allowed, w will be set. + - W maps to w. - E maps to x. - - H and P are always retained and ignored under Linux. + - D is ignored. - - A is always reset when a file is written to. + - H, S and P are always retained and ignored under Linux. + + - A is cleared when a file is written to. User id and group id will be used unless set[gu]id are given as mount options. Since most of the Amiga file systems are single user systems
@@ -111,11 +113,13 @@ Linux -> Amiga: The Linux rwxrwxrwx file mode is handled as follows: - - r permission will set R for user, group and others. + - r permission will allow R for user, group and others. + + - w permission will allow W for user, group and others. - - w permission will set W and D for user, group and others. + - x permission of the user will allow E for plain files. - - x permission of the user will set E for plain files. + - D will be allowed for user, group and others. - All other flags (suid, sgid, ...) are ignored and will not be retained.
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 4 -SUBLEVEL = 235 +SUBLEVEL = 236 EXTRAVERSION = NAME = Blurry Fish Butt
arch/s390/include/asm/percpu.h +14 -14
@@ -28,7 +28,7 @@typedef typeof (pcp)pcp_op_T__ ; \pcp_op_T__ old__, new__, prev__; \pcp_op_T__ *ptr__; \ -preempt_disable (); \ +preempt_disable_notrace (); \ ptr__ =raw_cpu_ptr (&(pcp)); \ prev__ = *ptr__; \ do { \
@@ -36,7 +36,7 @@ new__ = old__ op (val); \ prev__ =cmpxchg (ptr__, old__, new__); \ }while (prev__ != old__); \ -preempt_enable (); \ +preempt_enable_notrace (); \ new__; \ })
@@ -67,7 +67,7 @@typedef typeof (pcp)pcp_op_T__ ; \pcp_op_T__ val__ = (val); \pcp_op_T__ old__, *ptr__; \ -preempt_disable (); \ +preempt_disable_notrace (); \ ptr__ =raw_cpu_ptr (&(pcp)); \if (__builtin_constant_p (val__) && \ ((szcast )val__ >-129 ) && ((szcast )val__ <128 )) { \
@@ -83,7 +83,7 @@ : [val__] "d" (val__) \ : "cc"); \ } \ -preempt_enable (); \ +preempt_enable_notrace (); \ }#define this_cpu_add_4 (pcp, val) arch_this_cpu_add(pcp, val, "laa", "asi", int)
@@ -94,14 +94,14 @@typedef typeof (pcp)pcp_op_T__ ; \pcp_op_T__ val__ = (val); \pcp_op_T__ old__, *ptr__; \ -preempt_disable (); \ +preempt_disable_notrace (); \ ptr__ =raw_cpu_ptr (&(pcp)); \ asmvolatile ( \ op" %[old__],%[val__],%[ptr__]\n" \ : [old__]"=d" (old__), [ptr__]"+Q" (*ptr__) \ : [val__]"d" (val__) \ :"cc" ); \ -preempt_enable (); \ +preempt_enable_notrace (); \ old__ + val__; \ })
@@ -113,14 +113,14 @@typedef typeof (pcp)pcp_op_T__ ; \pcp_op_T__ val__ = (val); \pcp_op_T__ old__, *ptr__; \ -preempt_disable (); \ +preempt_disable_notrace (); \ ptr__ =raw_cpu_ptr (&(pcp)); \ asmvolatile ( \ op" %[old__],%[val__],%[ptr__]\n" \ : [old__]"=d" (old__), [ptr__]"+Q" (*ptr__) \ : [val__]"d" (val__) \ :"cc" ); \ -preempt_enable (); \ +preempt_enable_notrace (); \ }#define this_cpu_and_4 (pcp, val) arch_this_cpu_to_op(pcp, val, "lan")
@@ -135,10 +135,10 @@typedef typeof (pcp)pcp_op_T__ ; \pcp_op_T__ ret__; \pcp_op_T__ *ptr__; \ -preempt_disable (); \ +preempt_disable_notrace (); \ ptr__ =raw_cpu_ptr (&(pcp)); \ ret__ =cmpxchg (ptr__, oval, nval); \ -preempt_enable (); \ +preempt_enable_notrace (); \ ret__; \ })
@@ -151,10 +151,10 @@ ({ \typeof (pcp) *ptr__; \typeof (pcp) ret__; \ -preempt_disable (); \ +preempt_disable_notrace (); \ ptr__ =raw_cpu_ptr (&(pcp)); \ ret__ =xchg (ptr__, nval); \ -preempt_enable (); \ +preempt_enable_notrace (); \ ret__; \ })
@@ -170,11 +170,11 @@typeof (pcp1) *p1__; \typeof (pcp2) *p2__; \int ret__; \ -preempt_disable (); \ +preempt_disable_notrace (); \ p1__ =raw_cpu_ptr (&(pcp1)); \ p2__ =raw_cpu_ptr (&(pcp2)); \ ret__ =__cmpxchg_double (p1__, p2__, o1__, o2__, n1__, n2__); \ -preempt_enable (); \ +preempt_enable_notrace (); \ ret__; \ })
drivers/dma/at_hdmac.c +2 -0
@@ -1817,6 +1817,8 @@ static struct dma_chan *at_dma_xlate(struct of_phandle_args *dma_spec,return NULL ; dmac_pdev =of_find_device_by_node (dma_spec->np); +if (!dmac_pdev) +return NULL ;dma_cap_zero (mask);dma_cap_set (DMA_SLAVE , mask);
drivers/dma/of-dma.c +4 -4
@@ -72,12 +72,12 @@ static struct dma_chan *of_dma_router_xlate(struct of_phandle_args *dma_spec,return NULL ; chan = ofdma_target->of_dma_xlate (&dma_spec_target, ofdma_target); -if (chan) { - chan->router = ofdma->dma_router; - chan->route_data = route_data; - }else { +if (IS_ERR_OR_NULL (chan)) { ofdma->dma_router->route_free (ofdma->dma_router->dev, route_data); + }else { + chan->router = ofdma->dma_router; + chan->route_data = route_data; }/*
drivers/dma/pl330.c +1 -1
@@ -2629,6 +2629,7 @@ pl330_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dst,while (burst != (1 << desc->rqcfg.brst_size)) desc->rqcfg.brst_size++; + desc->rqcfg.brst_len =get_burst_len (desc, len);/* * 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.
@@ -2636,7 +2637,6 @@ pl330_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dst,if (desc->rqcfg.brst_size *8 < pl330->pcfg.data_bus_width) desc->rqcfg.brst_len =1 ; - desc->rqcfg.brst_len =get_burst_len (desc, len); desc->bytes_requested = len; desc->txd.flags = flags;
drivers/hid/hid-core.c +13 -2
@@ -1367,6 +1367,17 @@ static void hid_output_field(const struct hid_device *hid, } } +/* +* Compute the size of a report. +*/ +static size_t hid_compute_report_size (struct hid_report *report) +{ +if (report->size) +return ((report->size -1 ) >>3 ) +1 ; + +return 0 ; +} +/* * Create a report. 'data' has to be allocated using * hid_alloc_report_buf() so that it has proper size.
@@ -1379,7 +1390,7 @@ void hid_output_report(struct hid_report *report, __u8 *data)if (report->id >0 ) *data++ = report->id; -memset (data,0 , ((report->size -1 ) >>3 ) +1 ); +memset (data,0 ,hid_compute_report_size (report));for (n =0 ; n < report->maxfield; n++)hid_output_field (report->device, report->field[n], data); }
@@ -1506,7 +1517,7 @@ int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, u32 size, csize--; } - rsize = ((report->size -1 ) >>3 ) +1 ; + rsize =hid_compute_report_size (report);if (report_enum->numbered && rsize >=HID_MAX_BUFFER_SIZE ) rsize =HID_MAX_BUFFER_SIZE -1 ;
drivers/hid/hid-input.c +4 -0
@@ -994,6 +994,10 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel } mapped: +/* Mapping failed, bail out */ +if (!bit) +return ; +if (device->driver->input_mapped && device->driver->input_mapped (device, hidinput, field, usage, &bit, &max) <0 ) {
drivers/hid/hid-multitouch.c +2 -0
@@ -569,6 +569,8 @@ static int mt_touch_input_mapping(struct hid_device *hdev, struct hid_input *hi,case HID_UP_BUTTON : code =BTN_MOUSE + ((usage->hid -1 ) &HID_USAGE );hid_map_usage (hi, usage, bit, max,EV_KEY , code); +if (!*bit) +return -1 ;input_set_capability (hi->input,EV_KEY , code);return 1 ;
drivers/hwmon/applesmc.c +16 -15
@@ -758,15 +758,18 @@ static ssize_t applesmc_light_show(struct device *dev, } ret =applesmc_read_key (LIGHT_SENSOR_LEFT_KEY , buffer, data_length); +if (ret) + goto out;/* newer macbooks report a single 10-bit bigendian value */ if (data_length ==10 ) { left =be16_to_cpu (*(__be16 *)(buffer +6 )) >>2 ; goto out; } left = buffer[2 ]; + + ret =applesmc_read_key (LIGHT_SENSOR_RIGHT_KEY , buffer, data_length);if (ret) goto out; - ret =applesmc_read_key (LIGHT_SENSOR_RIGHT_KEY , buffer, data_length); right = buffer[2 ]; out:
@@ -814,12 +817,11 @@ static ssize_t applesmc_show_fan_speed(struct device *dev,sprintf (newkey, fan_speed_fmt[to_option (attr)],to_index (attr)); ret =applesmc_read_key (newkey, buffer,2 ); - speed = ((buffer[0 ] <<8 | buffer[1 ]) >>2 ); -if (ret)return ret; -else -return snprintf (sysfsbuf,PAGE_SIZE ,"%u\n" , speed); + + speed = ((buffer[0 ] <<8 | buffer[1 ]) >>2 ); +return snprintf (sysfsbuf,PAGE_SIZE ,"%u\n" , speed); } static ssize_t applesmc_store_fan_speed(struct device *dev,
@@ -854,12 +856,11 @@ static ssize_t applesmc_show_fan_manual(struct device *dev,u8 buffer[2 ]; ret =applesmc_read_key (FANS_MANUAL , buffer,2 ); - manual = ((buffer[0 ] <<8 | buffer[1 ]) >>to_index (attr)) &0x01 ; -if (ret)return ret; -else -return snprintf (sysfsbuf,PAGE_SIZE ,"%d\n" , manual); + + manual = ((buffer[0 ] <<8 | buffer[1 ]) >>to_index (attr)) &0x01 ; +return snprintf (sysfsbuf,PAGE_SIZE ,"%d\n" , manual); } static ssize_t applesmc_store_fan_manual(struct device *dev,
@@ -875,10 +876,11 @@ static ssize_t applesmc_store_fan_manual(struct device *dev,return -EINVAL ; ret =applesmc_read_key (FANS_MANUAL , buffer,2 ); - val = (buffer[0 ] <<8 | buffer[1 ]);if (ret) goto out; + val = (buffer[0 ] <<8 | buffer[1 ]); +if (input) val = val | (0x01 <<to_index (attr));else
@@ -954,13 +956,12 @@ static ssize_t applesmc_key_count_show(struct device *dev,u32 count; ret =applesmc_read_key (KEY_COUNT_KEY , buffer,4 ); - count = ((u32 )buffer[0 ]<<24 ) + ((u32 )buffer[1 ]<<16 ) + - ((u32 )buffer[2 ]<<8 ) + buffer[3 ]; -if (ret)return ret; -else -return snprintf (sysfsbuf,PAGE_SIZE ,"%d\n" , count); + + count = ((u32 )buffer[0 ]<<24 ) + ((u32 )buffer[1 ]<<16 ) + + ((u32 )buffer[2 ]<<8 ) + buffer[3 ]; +return snprintf (sysfsbuf,PAGE_SIZE ,"%d\n" , count); } static ssize_t applesmc_key_at_index_read_show(struct device *dev,
drivers/iommu/intel_irq_remapping.c +8 -2
@@ -486,12 +486,18 @@ static void iommu_enable_irq_remapping(struct intel_iommu *iommu)/* Enable interrupt-remapping */ iommu->gcmd |=DMA_GCMD_IRE ; - iommu->gcmd &= ~DMA_GCMD_CFI ;/* Block compatibility-format MSIs */ writel (iommu->gcmd, iommu->reg +DMAR_GCMD_REG ); -IOMMU_WAIT_OP (iommu,DMAR_GSTS_REG , readl, (sts &DMA_GSTS_IRES ), sts); +/* Block compatibility-format MSIs */ +if (sts &DMA_GSTS_CFIS ) { + iommu->gcmd &= ~DMA_GCMD_CFI ; +writel (iommu->gcmd, iommu->reg +DMAR_GCMD_REG ); +IOMMU_WAIT_OP (iommu,DMAR_GSTS_REG , + readl, !(sts &DMA_GSTS_CFIS ), sts); + } +/* * With CFI clear in the Global Command register, we should be * protected from dangerous (i.e. compatibility) interrupts
drivers/md/dm-cache-metadata.c +6 -2
@@ -501,12 +501,16 @@ static int __create_persistent_data_objects(struct dm_cache_metadata *cmd, CACHE_MAX_CONCURRENT_LOCKS);if (IS_ERR (cmd->bm)) {DMERR ("could not create block manager" ); -return PTR_ERR (cmd->bm); + r =PTR_ERR (cmd->bm); + cmd->bm =NULL ; +return r; } r =__open_or_format_metadata (cmd, may_format_device); -if (r) +if (r) {dm_block_manager_destroy (cmd->bm); + cmd->bm =NULL ; + }return r; }
drivers/md/dm-thin-metadata.c +6 -2
@@ -700,12 +700,16 @@ static int __create_persistent_data_objects(struct dm_pool_metadata *pmd, bool f THIN_MAX_CONCURRENT_LOCKS);if (IS_ERR (pmd->bm)) {DMERR ("could not create block manager" ); -return PTR_ERR (pmd->bm); + r =PTR_ERR (pmd->bm); + pmd->bm =NULL ; +return r; } r =__open_or_format_metadata (pmd, format_device); -if (r) +if (r) {dm_block_manager_destroy (pmd->bm); + pmd->bm =NULL ; + }return r; }
drivers/net/ethernet/broadcom/bnxt/bnxt.c +4 -7
@@ -4612,18 +4612,18 @@ static int __bnxt_open_nic(struct bnxt *bp, bool irq_re_init, bool link_re_init) } } -bnxt_enable_napi (bp); - rc =bnxt_init_nic (bp, irq_re_init);if (rc) {netdev_err (bp->dev,"bnxt_init_nic err: %x\n" , rc); - goto open_err; + goto open_err_irq; } +bnxt_enable_napi (bp); +if (link_re_init) { rc =bnxt_update_phy_setting (bp);if (rc) - goto open_err; +netdev_warn (bp->dev,"failed to update phy settings\n" ); }if (irq_re_init) {
@@ -4644,9 +4644,6 @@ static int __bnxt_open_nic(struct bnxt *bp, bool irq_re_init, bool link_re_init)return 0 ; -open_err: -bnxt_disable_napi (bp); - open_err_irq:bnxt_del_napi (bp);
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +3 -0
@@ -991,6 +991,9 @@ static int bnxt_get_nvram_directory(struct net_device *dev, u32 len, u8 *data)if (rc !=0 )return rc; +if (!dir_entries || !entry_length) +return -EIO ; +/* Insert 2 bytes of directory info (count and size of entries) */ if (len <2 )return -EINVAL ;
drivers/net/ethernet/broadcom/tg3.c +13 -4
@@ -7203,8 +7203,8 @@ static inline void tg3_reset_task_schedule(struct tg3 *tp)static inline void tg3_reset_task_cancel (struct tg3 *tp) { -cancel_work_sync (&tp->reset_task); -tg3_flag_clear (tp,RESET_TASK_PENDING ); +if (test_and_clear_bit (TG3_FLAG_RESET_TASK_PENDING , tp->tg3_flags)) +cancel_work_sync (&tp->reset_task);tg3_flag_clear (tp,TX_RECOVERY_PENDING ); }
@@ -11176,18 +11176,27 @@ static void tg3_reset_task(struct work_struct *work)tg3_halt (tp,RESET_KIND_SHUTDOWN ,0 ); err =tg3_init_hw (tp, true); -if (err) +if (err) { +tg3_full_unlock (tp); + tp->irq_sync =0 ; +tg3_napi_enable (tp); +/* Clear this flag so that tg3_reset_task_cancel() will not +* call cancel_work_sync() and wait forever. +*/ +tg3_flag_clear (tp,RESET_TASK_PENDING ); +dev_close (tp->dev); goto out; + }tg3_netif_start (tp); -out:tg3_full_unlock (tp);if (!err)tg3_phy_start (tp);tg3_flag_clear (tp,RESET_TASK_PENDING ); +out:rtnl_unlock (); }
drivers/net/ethernet/mellanox/mlx4/mr.c +1 -1
@@ -114,7 +114,7 @@ static int mlx4_buddy_init(struct mlx4_buddy *buddy, int max_order) goto err_out;for (i =0 ; i <= buddy->max_order; ++i) { - s =BITS_TO_LONGS (1 << (buddy->max_order - i)); + s =BITS_TO_LONGS (1UL << (buddy->max_order - i)); buddy->bits[i] =kcalloc (s,sizeof (long ),GFP_KERNEL | __GFP_NOWARN);if (!buddy->bits[i]) { buddy->bits[i] =vzalloc (s *sizeof (long ));
drivers/net/ethernet/renesas/ravb_main.c +55 -55
158 lines not on this page · raw message
drivers/net/usb/asix_common.c +1 -1
@@ -251,7 +251,7 @@ int asix_read_phy_addr(struct usbnet *dev, int internal)netdev_dbg (dev->net,"asix_get_phy_addr()\n" ); -if (ret <0 ) { +if (ret <2 ) {netdev_err (dev->net,"Error reading PHYID register: %02x\n" , ret); goto out; }
drivers/net/usb/dm9601.c +4 -0
@@ -624,6 +624,10 @@ static const struct usb_device_id products[] = { USB_DEVICE(0x0a46, 0x1269), /* DM9621A USB to Fast Ethernet Adapter */ .driver_info = (unsigned long)&dm9601_info, }, + { + USB_DEVICE(0x0586, 0x3427), /* ZyXEL Keenetic Plus DSL xDSL modem */ + .driver_info = (unsigned long)&dm9601_info, + }, {}, // END };
drivers/net/usb/qmi_wwan.c +182 -3
294 lines not on this page · raw message
drivers/thermal/ti-soc-thermal/omap4-thermal-data.c +12 -11
@@ -49,20 +49,21 @@ static struct temp_sensor_data omap4430_mpu_temp_sensor_data = {/* * Temperature values in milli degree celsius -* ADC code values from 530 to 923 +* ADC code values from 13 to 107, see TRM +* "18.4.10.2.3 ADC Codes Versus Temperature". */ static const int omap4430_adc_to_temp[OMAP4430_ADC_END_VALUE -OMAP4430_ADC_START_VALUE +1 ] = { --38000 ,-35000 ,-34000 ,-32000 ,-30000 ,-28000 ,-26000 ,-24000 ,-22000 , --20000 ,-18000 ,-17000 ,-15000 ,-13000 ,-12000 ,-10000 ,-8000 ,-6000 , --5000 ,-3000 ,-1000 ,0 ,2000 ,3000 ,5000 ,6000 ,8000 ,10000 ,12000 , -13000 ,15000 ,17000 ,19000 ,21000 ,23000 ,25000 ,27000 ,28000 ,30000 , -32000 ,33000 ,35000 ,37000 ,38000 ,40000 ,42000 ,43000 ,45000 ,47000 , -48000 ,50000 ,52000 ,53000 ,55000 ,57000 ,58000 ,60000 ,62000 ,64000 , -66000 ,68000 ,70000 ,71000 ,73000 ,75000 ,77000 ,78000 ,80000 ,82000 , -83000 ,85000 ,87000 ,88000 ,90000 ,92000 ,93000 ,95000 ,97000 ,98000 , -100000 ,102000 ,103000 ,105000 ,107000 ,109000 ,111000 ,113000 ,115000 , -117000 ,118000 ,120000 ,122000 ,123000 , +-40000 ,-38000 ,-35000 ,-34000 ,-32000 ,-30000 ,-28000 ,-26000 ,-24000 , +-22000 ,-20000 ,-18500 ,-17000 ,-15000 ,-13500 ,-12000 ,-10000 ,-8000 , +-6500 ,-5000 ,-3500 ,-1500 ,0 ,2000 ,3500 ,5000 ,6500 ,8500 ,10000 , +12000 ,13500 ,15000 ,17000 ,19000 ,21000 ,23000 ,25000 ,27000 ,28500 , +30000 ,32000 ,33500 ,35000 ,37000 ,38500 ,40000 ,42000 ,43500 ,45000 , +47000 ,48500 ,50000 ,52000 ,53500 ,55000 ,57000 ,58500 ,60000 ,62000 , +64000 ,66000 ,68000 ,70000 ,71500 ,73500 ,75000 ,77000 ,78500 ,80000 , +82000 ,83500 ,85000 ,87000 ,88500 ,90000 ,92000 ,93500 ,95000 ,97000 , +98500 ,100000 ,102000 ,103500 ,105000 ,107000 ,109000 ,111000 ,113000 , +115000 ,117000 ,118500 ,120000 ,122000 ,123500 ,125000 , };/* OMAP4430 data */
drivers/thermal/ti-soc-thermal/omap4xxx-bandgap.h +7 -3
@@ -67,9 +67,13 @@* and thresholds for OMAP4430. */ -/* ADC conversion table limits */ -#define OMAP4430_ADC_START_VALUE 0 -#define OMAP4430_ADC_END_VALUE 127 +/* +* ADC conversion table limits. Ignore values outside the TRM listed +* range to avoid bogus thermal shutdowns. See omap4430 TRM chapter +* "18.4.10.2.3 ADC Codes Versus Temperature". +*/ +#define OMAP4430_ADC_START_VALUE 13 +#define OMAP4430_ADC_END_VALUE 107/* bandgap clock limits (no control on 4430) */ #define OMAP4430_MAX_FREQ 32768#define OMAP4430_MIN_FREQ 32768
drivers/xen/xenbus/xenbus_client.c +8 -2
@@ -384,8 +384,14 @@ int xenbus_grant_ring(struct xenbus_device *dev, void *vaddr,int i, j;for (i =0 ; i < nr_pages; i++) { - err =gnttab_grant_foreign_access (dev->otherend_id, -virt_to_gfn (vaddr),0 ); +unsigned long gfn; + +if (is_vmalloc_addr (vaddr)) + gfn =pfn_to_gfn (vmalloc_to_pfn (vaddr)); +else + gfn =virt_to_gfn (vaddr); + + err =gnttab_grant_foreign_access (dev->otherend_id, gfn,0 );if (err <0 ) {xenbus_dev_fatal (dev, err,"granting access to ring page" );
fs/affs/amigaffs.c +45 -18
92 lines not on this page · raw message
fs/affs/file.c +25 -1
@@ -426,6 +426,24 @@ static int affs_write_begin(struct file *file, struct address_space *mapping,return ret; } +static int affs_write_end (struct file *file,struct address_space *mapping, +loff_t pos,unsigned int len,unsigned int copied, +struct page *page,void *fsdata) +{ +struct inode *inode = mapping->host; +int ret; + + ret =generic_write_end (file, mapping, pos, len, copied, page, fsdata); + +/* Clear Archived bit on file writes, as AmigaOS would do */ +if (AFFS_I (inode)->i_protect &FIBF_ARCHIVED ) { +AFFS_I (inode)->i_protect &= ~FIBF_ARCHIVED ; +mark_inode_dirty (inode); + } + +return ret; +} +static sector_t _affs_bmap (struct address_space *mapping,sector_t block) {return generic_block_bmap (mapping,block,affs_get_block);
@@ -435,7 +453,7 @@ const struct address_space_operations affs_aops = { .readpage = affs_readpage, .writepage = affs_writepage, .write_begin = affs_write_begin, - .write_end = generic_write_end, + .write_end = affs_write_end, .direct_IO = affs_direct_IO, .bmap = _affs_bmap };
@@ -793,6 +811,12 @@ done:if (tmp > inode->i_size) inode->i_size =AFFS_I (inode)->mmu_private = tmp; +/* Clear Archived bit on file writes, as AmigaOS would do */ +if (AFFS_I (inode)->i_protect &FIBF_ARCHIVED ) { +AFFS_I (inode)->i_protect &= ~FIBF_ARCHIVED ; +mark_inode_dirty (inode); + } + err_first_bh:unlock_page (page);page_cache_release (page);
fs/btrfs/ctree.c +5 -3
@@ -1372,7 +1372,8 @@ tree_mod_log_rewind(struct btrfs_fs_info *fs_info, struct btrfs_path *path,btrfs_tree_read_unlock_blocking (eb);free_extent_buffer (eb); -extent_buffer_get (eb_rewin); +btrfs_set_buffer_lockdep_class (btrfs_header_owner (eb_rewin), + eb_rewin,btrfs_header_level (eb_rewin));btrfs_tree_read_lock (eb_rewin);__tree_mod_log_rewind (fs_info, eb_rewin, time_seq, tm); WARN_ON(btrfs_header_nritems(eb_rewin) >
@@ -1441,8 +1442,6 @@ get_old_root(struct btrfs_root *root, u64 time_seq)if (!eb)return NULL ; -extent_buffer_get (eb); -btrfs_tree_read_lock (eb);if (old_root) {btrfs_set_header_bytenr (eb, eb->start);btrfs_set_header_backref_rev (eb,BTRFS_MIXED_BACKREF_REV );
@@ -1450,6 +1449,9 @@ get_old_root(struct btrfs_root *root, u64 time_seq)btrfs_set_header_level (eb, old_root->level);btrfs_set_header_generation (eb, old_generation); } +btrfs_set_buffer_lockdep_class (btrfs_header_owner (eb), eb, +btrfs_header_level (eb)); +btrfs_tree_read_lock (eb);if (tm)__tree_mod_log_rewind (root->fs_info, eb, time_seq, tm);else
fs/btrfs/extent_io.c +4 -4
@@ -5431,9 +5431,9 @@ void read_extent_buffer(const struct extent_buffer *eb, void *dstv, } } -int read_extent_buffer_to_user (const struct extent_buffer *eb, -void __user *dstv, -unsigned long start,unsigned long len) +int read_extent_buffer_to_user_nofault (const struct extent_buffer *eb, +void __user *dstv, +unsigned long start,unsigned long len) {size_t cur;size_t offset;
@@ -5454,7 +5454,7 @@ int read_extent_buffer_to_user(const struct extent_buffer *eb, cur =min (len, (PAGE_CACHE_SIZE - offset)); kaddr =page_address (page); -if (copy_to_user (dst, kaddr + offset, cur)) { +if (probe_user_write (dst, kaddr + offset, cur)) { ret = -EFAULT ;break ; }
fs/btrfs/extent_io.h +3 -3
@@ -313,9 +313,9 @@ int memcmp_extent_buffer(const struct extent_buffer *eb, const void *ptrv,void read_extent_buffer (const struct extent_buffer *eb,void *dst,unsigned long start,unsigned long len); -int read_extent_buffer_to_user (const struct extent_buffer *eb, -void __user *dst,unsigned long start, -unsigned long len); +int read_extent_buffer_to_user_nofault (const struct extent_buffer *eb, +void __user *dst,unsigned long start, +unsigned long len);void write_extent_buffer (struct extent_buffer *eb,const void *src,unsigned long start,unsigned long len); void copy_extent_buffer(struct extent_buffer *dst, struct extent_buffer *src,
fs/btrfs/ioctl.c +20 -7
@@ -2017,9 +2017,14 @@ static noinline int copy_to_sk(struct btrfs_root *root, sh.len = item_len; sh.transid = found_transid; -/* copy search result header */ -if (copy_to_user (ubuf + *sk_offset, &sh,sizeof (sh))) { - ret = -EFAULT ; +/* +* Copy search result header. If we fault then loop again so we +* can fault in the pages and -EFAULT there if there's a +* problem. Otherwise we'll fault and then copy the buffer in +* properly this next time through +*/ +if (probe_user_write (ubuf + *sk_offset, &sh,sizeof (sh))) { + ret =0 ; goto out; }
@@ -2027,10 +2032,14 @@ static noinline int copy_to_sk(struct btrfs_root *root,if (item_len) {char __user *up = ubuf + *sk_offset; -/* copy the item */ -if (read_extent_buffer_to_user (leaf, up, - item_off, item_len)) { - ret = -EFAULT ; +/* +* Copy the item, same behavior as above, but reset the +* * sk_offset so we copy the full thing again. +*/ +if (read_extent_buffer_to_user_nofault (leaf, up, + item_off, item_len)) { + ret =0 ; + *sk_offset -=sizeof (sh); goto out; }
@@ -2120,6 +2129,10 @@ static noinline int search_ioctl(struct inode *inode, key.offset = sk->min_offset;while (1 ) { + ret =fault_in_pages_writeable (ubuf, *buf_size - sk_offset); +if (ret) +break ; + ret =btrfs_search_forward (root, &key, path, sk->min_transid);if (ret !=0 ) {if (ret >0 )
fs/btrfs/volumes.c +2 -1
@@ -4065,6 +4065,7 @@ static int btrfs_uuid_scan_kthread(void *data) goto skip; } update_tree: +btrfs_release_path (path);if (!btrfs_is_empty_uuid (root_item.uuid)) { ret = btrfs_uuid_tree_add(trans, fs_info->uuid_root, root_item.uuid,
@@ -4090,6 +4091,7 @@ update_tree: } skip: +btrfs_release_path (path);if (trans) { ret =btrfs_end_transaction (trans, fs_info->uuid_root); trans =NULL ;
@@ -4097,7 +4099,6 @@ skip:break ; } -btrfs_release_path (path);if (key.offset < (u64)-1 ) { key.offset++; }else if (key.type <BTRFS_ROOT_ITEM_KEY ) {
fs/ceph/file.c +1 -0
@@ -1433,6 +1433,7 @@ const struct file_operations ceph_file_fops = { .mmap = ceph_mmap, .fsync = ceph_fsync, .lock = ceph_lock, + .setlease = simple_nosetlease, .flock = ceph_flock, .splice_read = generic_file_splice_read, .splice_write = iter_file_splice_write,
fs/eventpoll.c +3 -3
@@ -1720,9 +1720,9 @@ static int ep_loop_check_proc(void *priv, void *cookie, int call_nests)* during ep_insert(). */ if (list_empty (&epi->ffd.file->f_tfile_llink)) { -get_file (epi->ffd.file); -list_add (&epi->ffd.file->f_tfile_llink, - &tfile_check_list); +if (get_file_rcu (epi->ffd.file)) +list_add (&epi->ffd.file->f_tfile_llink, + &tfile_check_list); } } }
include/linux/hid.h +29 -13
70 lines not on this page · raw message
include/linux/log2.h +1 -1
@@ -159,7 +159,7 @@ unsigned long __rounddown_pow_of_two(unsigned long n)#define roundup_pow_of_two (n) \ ( \ __builtin_constant_p(n) ? ( \ - (n == 1) ? 1 : \ + ((n) == 1) ? 1 : \ (1UL << (ilog2((n) - 1) + 1)) \ ) : \ __roundup_pow_of_two(n) \
include/linux/uaccess.h +26 -0
@@ -90,6 +90,17 @@ static inline unsigned long __copy_from_user_nocache(void *to,extern long probe_kernel_read (void *dst,const void *src,size_t size);extern long __probe_kernel_read (void *dst,const void *src,size_t size); +/* +* probe_user_read(): safely attempt to read from a location in user space +* @dst: pointer to the buffer that shall take the data +* @src: address to read from +* @size: size of the data chunk +* +* Safely read from address @src to the buffer at @dst. If a kernel fault +* happens, handle that and return -EFAULT. +*/ +extern long probe_user_read (void *dst,const void __user *src,size_t size); +/* * probe_kernel_write(): safely attempt to write to a location * @dst: address to write to
@@ -102,7 +113,22 @@ extern long __probe_kernel_read(void *dst, const void *src, size_t size);extern long notrace probe_kernel_write (void *dst,const void *src,size_t size);extern long notrace __probe_kernel_write (void *dst,const void *src,size_t size); +/* +* probe_user_write(): safely attempt to write to a location in user space +* @dst: address to write to +* @src: pointer to the data that shall be written +* @size: size of the data chunk +* +* Safely write to address @dst from the buffer at @src. If a kernel fault +* happens, handle that and return -EFAULT. +*/ +extern long notrace probe_user_write (void __user *dst,const void *src,size_t size); +extern long notrace __probe_user_write (void __user *dst,const void *src,size_t size); +extern long strncpy_from_unsafe (char *dst,const void *unsafe_addr,long count); +extern long strncpy_from_unsafe_user (char *dst,const void __user *unsafe_addr, +long count); +extern long strnlen_unsafe_user (const void __user *unsafe_addr,long count);/** * probe_kernel_address(): safely attempt to read from a location
include/net/inet_connection_sock.h +4 -0
@@ -319,5 +319,9 @@ int inet_csk_compat_getsockopt(struct sock *sk, int level, int optname,int inet_csk_compat_setsockopt (struct sock *sk,int level,int optname,char __user *optval,unsigned int optlen); +/* update the fast reuse flag when adding a socket */ +void inet_csk_update_fastreuse (struct inet_bind_bucket *tb, +struct sock *sk); +struct dst_entry *inet_csk_update_pmtu (struct sock *sk,u32 mtu);#endif /* _INET_CONNECTION_SOCK_H */
include/net/netfilter/nf_tables.h +2 -0
@@ -74,6 +74,8 @@ struct nft_regs {static inline void nft_data_copy (u32 *dst,const struct nft_data *src,unsigned int len) { +if (len %NFT_REG32_SIZE ) + dst[len /NFT_REG32_SIZE ] =0 ;memcpy (dst, src, len); }
include/uapi/linux/netfilter/nf_tables.h +1 -1
@@ -111,7 +111,7 @@ enum nf_tables_msg_types {* @NFTA_LIST_ELEM: list element (NLA_NESTED) */ enum nft_list_attributes { -NFTA_LIST_UNPEC , +NFTA_LIST_UNSPEC ,NFTA_LIST_ELEM , __NFTA_LIST_MAX };
mm/hugetlb.c +20 -6
@@ -2812,6 +2812,22 @@ static unsigned int cpuset_mems_nr(unsigned int *array) }#ifdef CONFIG_SYSCTL +static int proc_hugetlb_doulongvec_minmax (struct ctl_table *table,int write, +void *buffer,size_t *length, +loff_t *ppos,unsigned long *out) +{ +struct ctl_table dup_table; + +/* +* In order to avoid races with __do_proc_doulongvec_minmax(), we +* can duplicate the @table and alter the duplicate of it. +*/ + dup_table = *table; + dup_table.data = out; + +return proc_doulongvec_minmax (&dup_table, write, buffer, length, ppos); +} +static int hugetlb_sysctl_handler_common (bool obey_mempolicy,struct ctl_table *table,int write,void __user *buffer,size_t *length,loff_t *ppos)
@@ -2823,9 +2839,8 @@ static int hugetlb_sysctl_handler_common(bool obey_mempolicy,if (!hugepages_supported ())return -ENOTSUPP ; - table->data = &tmp; - table->maxlen =sizeof (unsigned long ); - ret =proc_doulongvec_minmax (table, write, buffer, length, ppos); + ret =proc_hugetlb_doulongvec_minmax (table, write, buffer, length, ppos, + &tmp);if (ret) goto out;
@@ -2869,9 +2884,8 @@ int hugetlb_overcommit_handler(struct ctl_table *table, int write,if (write &&hstate_is_gigantic (h))return -EINVAL ; - table->data = &tmp; - table->maxlen =sizeof (unsigned long ); - ret =proc_doulongvec_minmax (table, write, buffer, length, ppos); + ret =proc_hugetlb_doulongvec_minmax (table, write, buffer, length, ppos, + &tmp);if (ret) goto out;
mm/maccess.c +157 -10
205 lines not on this page · raw message
mm/page_alloc.c +3 -4
@@ -835,7 +835,6 @@ static void free_pcppages_bulk(struct zone *zone, int count, {int migratetype =0 ;int batch_free =0 ; -int to_free = count;unsigned long nr_scanned;spin_lock (&zone->lock);
@@ -848,7 +847,7 @@ static void free_pcppages_bulk(struct zone *zone, int count,* below while (list_empty(list)) loop. */ count =min (pcp->count, count); -while (to_free) { +while (count) {struct page *page;struct list_head *list;
@@ -868,7 +867,7 @@ static void free_pcppages_bulk(struct zone *zone, int count,/* This is the only non-empty list. Free them all. */ if (batch_free ==MIGRATE_PCPTYPES ) - batch_free = to_free; + batch_free = count; do { int mt; /* migratetype of the to-be-freed page */
@@ -886,7 +885,7 @@ static void free_pcppages_bulk(struct zone *zone, int count,__free_one_page (page,page_to_pfn (page), zone,0 , mt);trace_mm_page_pcpu_drain (page,0 , mt); - }while (--to_free && --batch_free && !list_empty (list)); + }while (--count && --batch_free && !list_empty (list)); }spin_unlock (&zone->lock); }
net/batman-adv/bridge_loop_avoidance.c +4 -1
@@ -380,7 +380,10 @@ static void batadv_bla_send_claim(struct batadv_priv *bat_priv, u8 *mac, skb->len + ETH_HLEN); soft_iface->last_rx = jiffies; -netif_rx (skb); +if (in_interrupt ()) +netif_rx (skb); +else +netif_rx_ni (skb); out:if (primary_if)batadv_hardif_free_ref (primary_if);
net/batman-adv/gateway_client.c +4 -2
@@ -757,8 +757,10 @@ batadv_gw_dhcp_recipient_get(struct sk_buff *skb, unsigned int *header_len, chaddr_offset = *header_len +BATADV_DHCP_CHADDR_OFFSET ;/* store the client address if the message is going to a client */ -if (ret ==BATADV_DHCP_TO_CLIENT && -pskb_may_pull (skb, chaddr_offset +ETH_ALEN )) { +if (ret ==BATADV_DHCP_TO_CLIENT ) { +if (!pskb_may_pull (skb, chaddr_offset +ETH_ALEN )) +return BATADV_DHCP_NO ; +/* check if the DHCP packet carries an Ethernet DHCP */ p = skb->data + *header_len +BATADV_DHCP_HTYPE_OFFSET ;if (*p !=BATADV_DHCP_HTYPE_ETHERNET )
net/core/dev.c +2 -1
@@ -4849,13 +4849,14 @@ void netif_napi_add(struct net_device *dev, struct napi_struct *napi,pr_err_once ("netif_napi_add() called with weight %d on device %s\n" , weight, dev->name); napi->weight = weight; -list_add (&napi->dev_list, &dev->napi_list); napi->dev = dev;#ifdef CONFIG_NETPOLL spin_lock_init (&napi->poll_lock); napi->poll_owner =-1 ;#endif set_bit (NAPI_STATE_SCHED , &napi->state); +set_bit (NAPI_STATE_NPSVC , &napi->state); +list_add_rcu (&napi->dev_list, &dev->napi_list); }EXPORT_SYMBOL (netif_napi_add);
net/core/netpoll.c +1 -1
@@ -178,7 +178,7 @@ static void poll_napi(struct net_device *dev) {struct napi_struct *napi; -list_for_each_entry (napi, &dev->napi_list, dev_list) { +list_for_each_entry_rcu (napi, &dev->napi_list, dev_list) {if (napi->poll_owner !=smp_processor_id () &&spin_trylock (&napi->poll_lock)) {poll_one_napi (napi);
net/ipv4/inet_connection_sock.c +28 -18
58 lines not on this page · raw message
net/ipv4/inet_hashtables.c +1 -0
@@ -160,6 +160,7 @@ int __inet_inherit_port(const struct sock *sk, struct sock *child)return -ENOMEM ; } } +inet_csk_update_fastreuse (tb, child); }inet_bind_hash (child, tb, port);spin_unlock (&head->lock);
net/netfilter/nft_payload.c +3 -1
@@ -74,7 +74,9 @@ static void nft_payload_eval(const struct nft_expr *expr,u32 *dest = ®s->data[priv->dreg];int offset; - dest[priv->len /NFT_REG32_SIZE ] =0 ; +if (priv->len %NFT_REG32_SIZE ) + dest[priv->len /NFT_REG32_SIZE ] =0 ; +switch (priv->base) {case NFT_PAYLOAD_LL_HEADER :if (!skb_mac_header_was_set (skb))
net/sctp/socket.c +6 -10
@@ -6206,8 +6206,6 @@ static long sctp_get_port_local(struct sock *sk, union sctp_addr *addr)pr_debug ("%s: begins, snum:%d\n" , __func__, snum); -local_bh_disable (); -if (snum ==0 ) {/* Search for an available port. */ int low, high, remaining, index;
@@ -6226,20 +6224,21 @@ static long sctp_get_port_local(struct sock *sk, union sctp_addr *addr)continue ; index =sctp_phashfn (sock_net (sk), rover); head = &sctp_port_hashtable[index]; -spin_lock (&head->lock); +spin_lock_bh (&head->lock);sctp_for_each_hentry (pp, &head->chain)if ((pp->port == rover) &&net_eq (sock_net (sk), pp->net)) goto next;break ; next: -spin_unlock (&head->lock); +spin_unlock_bh (&head->lock); +cond_resched (); }while (--remaining >0 );/* Exhausted local port range during search? */ ret =1 ;if (remaining <=0 ) - goto fail; +return ret;/* OK, here is the one we will use. HEAD (the port * hash table list entry) is non-NULL and we hold it's
@@ -6254,7 +6253,7 @@ static long sctp_get_port_local(struct sock *sk, union sctp_addr *addr)* port iterator, pp being NULL. */ head = &sctp_port_hashtable[sctp_phashfn (sock_net (sk), snum)]; -spin_lock (&head->lock); +spin_lock_bh (&head->lock);sctp_for_each_hentry (pp, &head->chain) {if ((pp->port == snum) &&net_eq (pp->net,sock_net (sk))) goto pp_found;
@@ -6338,10 +6337,7 @@ success: ret =0 ; fail_unlock: -spin_unlock (&head->lock); - -fail: -local_bh_enable (); +spin_unlock_bh (&head->lock);return ret; }
net/wireless/reg.c +3 -0
@@ -2383,6 +2383,9 @@ int regulatory_hint_user(const char *alpha2,if (WARN_ON (!alpha2))return -EINVAL ; +if (!is_world_regdom (alpha2) && !is_an_alpha2 (alpha2)) +return -EINVAL ; + request =kzalloc (sizeof (struct regulatory_request ),GFP_KERNEL );if (!request)return -ENOMEM ;
scripts/checkpatch.pl +2 -2
@@ -2195,8 +2195,8 @@ sub process { # Check if the commit log has what seems like a diff which can confuse patch if ($in_commit_log && !$commit_log_has_diff && - (($line =~ m@^\s+diff\b.*a/[\w/]+@ && - $line =~ m@^\s+diff\b.*a/([\w/]+)\s+b/$1\b@) || + (($line =~ m@^\s+diff\b.*a/([\w/]+)@ && + $line =~ m@^\s+diff\b.*a/[\w/]+\s+b/$1\b@) || $line =~ m@^\s*(?:\-\-\-\s+a/|\+\+\+\s+b/)@ || $line =~ m/^\s*\@\@ \-\d+,\d+ \+\d+,\d+ \@\@/)) { ERROR("DIFF_IN_COMMIT_MSG",
sound/core/oss/mulaw.c +2 -2
@@ -329,8 +329,8 @@ int snd_pcm_plugin_build_mulaw(struct snd_pcm_substream *plug,snd_BUG ();return -EINVAL ; } -if (snd_BUG_ON (!snd_pcm_format_linear (format->format))) -return -ENXIO ; +if (!snd_pcm_format_linear (format->format)) +return -EINVAL ; err = snd_pcm_plugin_build(plug, "Mu-Law<->linear conversion", src_format, dst_format,
sound/firewire/digi00x/digi00x.c +16 -2
@@ -13,7 +13,9 @@ MODULE_AUTHOR("Takashi Sakamoto <[email protected]>");MODULE_LICENSE ("GPL v2" );#define VENDOR_DIGIDESIGN 0x00a07e -#define MODEL_DIGI00X 0x000002 +#define MODEL_CONSOLE 0x000001 +#define MODEL_RACK 0x000002 +#define SPEC_VERSION 0x000001static int name_card (struct snd_dg00x *dg00x) {
@@ -75,6 +77,8 @@ static int snd_dg00x_probe(struct fw_unit *unit,spin_lock_init (&dg00x->lock);init_waitqueue_head (&dg00x->hwdep_wait); + dg00x->is_console = entry->model_id ==MODEL_CONSOLE ; + err =name_card (dg00x);if (err <0 ) goto error;
@@ -136,9 +140,19 @@ static const struct ieee1394_device_id snd_dg00x_id_table[] = {/* Both of 002/003 use the same ID. */ { .match_flags = IEEE1394_MATCH_VENDOR_ID | + IEEE1394_MATCH_VERSION | + IEEE1394_MATCH_MODEL_ID, + .vendor_id = VENDOR_DIGIDESIGN, + .version = SPEC_VERSION, + .model_id = MODEL_CONSOLE, + }, + { + .match_flags = IEEE1394_MATCH_VENDOR_ID | + IEEE1394_MATCH_VERSION | IEEE1394_MATCH_MODEL_ID, .vendor_id = VENDOR_DIGIDESIGN, - .model_id = MODEL_DIGI00X, + .version = SPEC_VERSION, + .model_id = MODEL_RACK, }, {} };
sound/firewire/digi00x/digi00x.h +1 -0
@@ -57,6 +57,7 @@ struct snd_dg00x {/* For asynchronous MIDI controls. */ struct snd_rawmidi_substream *in_control;struct snd_fw_async_midi_port out_control; +bool is_console; };#define DG00X_ADDR_BASE 0xffffe0000000ull
sound/firewire/tascam/tascam.c +29 -1
@@ -172,11 +172,39 @@ static void snd_tscm_remove(struct fw_unit *unit) }static const struct ieee1394_device_id snd_tscm_id_table[] = { +// Tascam, FW-1884. { .match_flags =IEEE1394_MATCH_VENDOR_ID | -IEEE1394_MATCH_SPECIFIER_ID , +IEEE1394_MATCH_SPECIFIER_ID | +IEEE1394_MATCH_VERSION , .vendor_id =0x00022e , .specifier_id =0x00022e , + .version =0x800000 , + }, +// Tascam, FE-8 (.version = 0x800001) +// This kernel module doesn't support FE-8 because the most of features +// can be implemented in userspace without any specific support of this +// module. +// +// .version = 0x800002 is unknown. +// +// Tascam, FW-1082. + { + .match_flags =IEEE1394_MATCH_VENDOR_ID | +IEEE1394_MATCH_SPECIFIER_ID | +IEEE1394_MATCH_VERSION , + .vendor_id =0x00022e , + .specifier_id =0x00022e , + .version =0x800003 , + }, +// Tascam, FW-1804. + { + .match_flags =IEEE1394_MATCH_VENDOR_ID | +IEEE1394_MATCH_SPECIFIER_ID | +IEEE1394_MATCH_VERSION , + .vendor_id =0x00022e , + .specifier_id =0x00022e , + .version =0x800004 , },/* FE-08 requires reverse-engineering because it just has faders. */ {}
sound/pci/ca0106/ca0106_main.c +2 -1
@@ -551,7 +551,8 @@ static int snd_ca0106_pcm_power_dac(struct snd_ca0106 *chip, int channel_id,else /* Power down */ chip->spi_dac_reg[reg] |= bit; -return snd_ca0106_spi_write (chip, chip->spi_dac_reg[reg]); +if (snd_ca0106_spi_write (chip, chip->spi_dac_reg[reg]) !=0 ) +return -ENXIO ; }return 0 ; }
tools/perf/Documentation/perf-record.txt +4 -0
@@ -33,6 +33,10 @@ OPTIONS - a raw PMU event (eventsel+umask) in the form of rNNN where NNN is a hexadecimal event descriptor. + - a symbolic or raw PMU event followed by an optional colon + and a list of event modifiers, e.g., cpu-cycles:p. See the + linkperf:perf-list[1] man page for details on event modifiers. + - a symbolically formed PMU event like 'pmu/param1=0x3,param2/' where 'param1', 'param2', etc are defined as formats for the PMU in /sys/bus/event_sources/devices/<pmu>/format/*.
tools/perf/Documentation/perf-stat.txt +4 -0
@@ -32,6 +32,10 @@ OPTIONS - a raw PMU event (eventsel+umask) in the form of rNNN where NNN is a hexadecimal event descriptor. + - a symbolic or raw PMU event followed by an optional colon + and a list of event modifiers, e.g., cpu-cycles:p. See the + linkperf:perf-list[1] man page for details on event modifiers. + - a symbolically formed event like 'pmu/param1=0x3,param2/' where param1 and param2 are defined as formats for the PMU in /sys/bus/event_sources/devices/<pmu>/format/*