Linux 4.9.135
Greg KH
maintainerI'm announcing the release of the 4.9.135 kernel.
All users of the 4.9 kernel series must upgrade.
The updated 4.9.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.9.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/arc/Makefile | 24 --------- arch/powerpc/kernel/tm.S | 20 +++++++- arch/s390/appldata/appldata_os.c | 16 +++--- arch/x86/include/asm/pgtable_types.h | 2 drivers/clocksource/timer-ti-32k.c | 3 + drivers/cpufreq/cpufreq.c | 6 +- drivers/cpufreq/cpufreq_governor.c | 2 drivers/cpufreq/cpufreq_stats.c | 1 drivers/gpu/drm/arm/malidp_drv.c | 1 drivers/hid/hid-core.c | 3 + drivers/hv/hv_kvp.c | 13 +++-- drivers/input/keyboard/atakbd.c | 74 +++++++++++------------------- drivers/iommu/amd_iommu.c | 6 ++ drivers/macintosh/rack-meter.c | 28 +++++------ drivers/media/usb/dvb-usb-v2/af9035.c | 6 +- drivers/net/ethernet/mellanox/mlx4/eq.c | 3 - drivers/net/ethernet/renesas/ravb.h | 5 ++ drivers/net/ethernet/renesas/ravb_main.c | 11 ++-- drivers/net/ethernet/renesas/ravb_ptp.c | 2 drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 5 -- drivers/scsi/sd.c | 3 - drivers/usb/gadget/function/u_serial.c | 2 fs/ext4/ext4.h | 3 - fs/ext4/inline.c | 38 --------------- fs/ext4/xattr.c | 18 ------- fs/proc/stat.c | 68 ++++++++++++++-------------- fs/proc/uptime.c | 7 -- include/linux/huge_mm.h | 2 kernel/sched/cpuacct.c | 2 kernel/sched/cputime.c | 75 +++++++++++++------------------ kernel/sched/sched.h | 12 +++- mm/huge_memory.c | 10 +--- mm/mremap.c | 30 +++++------- net/batman-adv/bat_v_elp.c | 8 ++- net/batman-adv/bridge_loop_avoidance.c | 10 +++- net/batman-adv/network-coding.c | 27 ++++++----- net/batman-adv/soft-interface.c | 25 +++++++--- net/batman-adv/sysfs.c | 30 ++++++++---- net/batman-adv/translation-table.c | 6 +- net/batman-adv/tvlv.c | 8 ++- net/netfilter/nf_nat_core.c | 2 42 files changed, 295 insertions(+), 324 deletions(-)
Alexandru Gheorghe (1):
drm: mali-dp: Call drm_crtc_vblank_reset on device init
Alexey Brodkin (2):
ARC: build: Get rid of toolchain check
ARC: build: Don't set CROSS_COMPILE in arch's Makefile
Andreas Schwab (1):
Input: atakbd - fix Atari keymap
Arindam Nath (1):
iommu/amd: Return devid as alias for ACPI HID devices
Frederic Weisbecker (4):
sched/cputime: Convert kcpustat to nsecs macintosh/rack-meter: Convert cputime64_t use to u64 sched/cputime: Increment kcpustat directly on irqtime account sched/cputime: Fix ksoftirqd cputime accounting regression
Greg Kroah-Hartman (1):
Linux 4.9.135
Jan Kara (1):
mm: Preserve _PAGE_DEVMAP across mprotect() calls
Johannes Thumshirn (1):
scsi: sd: don't crash the host on invalid commands
Jozef Balga (1):
media: af9035: prevent buffer overflow on write
Kazuya Mizuguchi (1):
ravb: do not write 1 to reserved bits
Keerthy (1):
clocksource/drivers/ti-32k: Add CLOCK_SOURCE_SUSPEND_NONSTOP flag for non-am43 SoCs
Laura Abbott (2):
scsi: ibmvscsis: Fix a stringop-overflow warning
scsi: ibmvscsis: Ensure partition name is properly NUL terminated
Linus Torvalds (1):
mremap: properly flush TLB before releasing the page
Long Li (1):
HV: properly delay KVP packets when negotiation is in progress
Marek Lindner (2):
batman-adv: fix backbone_gw refcount on queue_work() failure
batman-adv: fix hardif_neigh refcount on queue_work() failure
Michael Neuling (2):
powerpc/tm: Fix userspace r13 corruption powerpc/tm: Avoid possible userspace r1 corruption on reclaim
Michael Schmitz (1):
Input: atakbd - fix Atari CapsLock behaviour
Natanael Copa (1):
HID: quirks: fix support for Apple Magic Keyboards
Nathan Chancellor (1):
net/mlx4: Use cpumask_available for eq->affinity_mask
Stephen Warren (1):
usb: gadget: serial: fix oops when data rx'd after close
Sven Eckelmann (6):
batman-adv: Fix segfault when writing to throughput_override
batman-adv: Fix segfault when writing to sysfs elp_interval
batman-adv: Prevent duplicated nc_node entry
batman-adv: Prevent duplicated softif_vlan entry
batman-adv: Prevent duplicated global TT entry
batman-adv: Prevent duplicated tvlv handler
Theodore Ts'o (1):
ext4: avoid running out of journal credits when appending to an inline file
Xin Long (1):
netfilter: check for seqadj ext existence before adding it in nf_nat_setup_info
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 4 PATCHLEVEL = 9 -SUBLEVEL = 134 +SUBLEVEL = 135 EXTRAVERSION = NAME = Roaring Lionus
arch/arc/Makefile +1 -23
@@ -8,34 +8,12 @@ UTS_MACHINE := arc -ifeq ($(CROSS_COMPILE),) -ifndef CONFIG_CPU_BIG_ENDIAN -CROSS_COMPILE := arc-linux- -else -CROSS_COMPILE := arceb-linux- -endif -endif - KBUILD_DEFCONFIG := nsim_700_defconfig cflags-y += -fno-common -pipe -fno-builtin -mmedium-calls -D__linux__ cflags-$(CONFIG_ISA_ARCOMPACT) += -mA7 cflags-$(CONFIG_ISA_ARCV2) += -mcpu=archs -is_700 = $(shell $(CC) -dM -E - < /dev/null | grep -q "ARC700" && echo 1 || echo 0) - -ifdef CONFIG_ISA_ARCOMPACT -ifeq ($(is_700), 0) - $(error Toolchain not configured for ARCompact builds) -endif -endif - -ifdef CONFIG_ISA_ARCV2 -ifeq ($(is_700), 1) - $(error Toolchain not configured for ARCv2 builds) -endif -endif - ifdef CONFIG_ARC_CURR_IN_REG # For a global register defintion, make sure it gets passed to every file # We had a customer reported bug where some code built in kernel was NOT using
@@ -89,7 +67,7 @@ ldflags-$(CONFIG_CPU_BIG_ENDIAN) += -EB # --build-id w/o "-marclinux". Default arc-elf32-ld is OK ldflags-$(upto_gcc44) += -marclinux -LIBGCC := $(shell $(CC) $(cflags-y) --print-libgcc-file-name) +LIBGCC = $(shell $(CC) $(cflags-y) --print-libgcc-file-name) # Modules with short calls might break for calls into builtin-kernel KBUILD_CFLAGS_MODULE += -mlong-calls -mno-millicode
arch/powerpc/kernel/tm.S +17 -3
@@ -166,13 +166,27 @@ _GLOBAL(tm_reclaim) std r1, PACATMSCRATCH(r13) ld r1, PACAR1(r13) - /* Store the PPR in r11 and reset to decent value */ std r11, GPR11(r1) /* Temporary stash */ + /* + * Move the saved user r1 to the kernel stack in case PACATMSCRATCH is + * clobbered by an exception once we turn on MSR_RI below. + */ + ld r11, PACATMSCRATCH(r13) + std r11, GPR1(r1) + + /* + * Store r13 away so we can free up the scratch SPR for the SLB fault + * handler (needed once we start accessing the thread_struct). + */ + GET_SCRATCH0(r11) + std r11, GPR13(r1) + /* Reset MSR RI so we can take SLB faults again */ li r11, MSR_RI mtmsrd r11, 1 + /* Store the PPR in r11 and reset to decent value */ mfspr r11, SPRN_PPR HMT_MEDIUM
@@ -197,11 +211,11 @@ _GLOBAL(tm_reclaim) SAVE_GPR(8, r7) /* user r8 */ SAVE_GPR(9, r7) /* user r9 */ SAVE_GPR(10, r7) /* user r10 */ - ld r3, PACATMSCRATCH(r13) /* user r1 */ + ld r3, GPR1(r1) /* user r1 */ ld r4, GPR7(r1) /* user r7 */ ld r5, GPR11(r1) /* user r11 */ ld r6, GPR12(r1) /* user r12 */ - GET_SCRATCH0(8) /* user r13 */ + ld r8, GPR13(r1) /* user r13 */ std r3, GPR1(r7) std r4, GPR7(r7) std r5, GPR11(r7)
arch/s390/appldata/appldata_os.c +8 -8
@@ -113,21 +113,21 @@ static void appldata_get_os_data(void *data) j =0 ;for_each_online_cpu (i) { os_data->os_cpu[j].per_cpu_user = -cputime_to_jiffies (kcpustat_cpu (i).cpustat[CPUTIME_USER ]); +nsecs_to_jiffies (kcpustat_cpu (i).cpustat[CPUTIME_USER ]); os_data->os_cpu[j].per_cpu_nice = -cputime_to_jiffies (kcpustat_cpu (i).cpustat[CPUTIME_NICE ]); +nsecs_to_jiffies (kcpustat_cpu (i).cpustat[CPUTIME_NICE ]); os_data->os_cpu[j].per_cpu_system = -cputime_to_jiffies (kcpustat_cpu (i).cpustat[CPUTIME_SYSTEM ]); +nsecs_to_jiffies (kcpustat_cpu (i).cpustat[CPUTIME_SYSTEM ]); os_data->os_cpu[j].per_cpu_idle = -cputime_to_jiffies (kcpustat_cpu (i).cpustat[CPUTIME_IDLE ]); +nsecs_to_jiffies (kcpustat_cpu (i).cpustat[CPUTIME_IDLE ]); os_data->os_cpu[j].per_cpu_irq = -cputime_to_jiffies (kcpustat_cpu (i).cpustat[CPUTIME_IRQ ]); +nsecs_to_jiffies (kcpustat_cpu (i).cpustat[CPUTIME_IRQ ]); os_data->os_cpu[j].per_cpu_softirq = -cputime_to_jiffies (kcpustat_cpu (i).cpustat[CPUTIME_SOFTIRQ ]); +nsecs_to_jiffies (kcpustat_cpu (i).cpustat[CPUTIME_SOFTIRQ ]); os_data->os_cpu[j].per_cpu_iowait = -cputime_to_jiffies (kcpustat_cpu (i).cpustat[CPUTIME_IOWAIT ]); +nsecs_to_jiffies (kcpustat_cpu (i).cpustat[CPUTIME_IOWAIT ]); os_data->os_cpu[j].per_cpu_steal = -cputime_to_jiffies (kcpustat_cpu (i).cpustat[CPUTIME_STEAL ]); +nsecs_to_jiffies (kcpustat_cpu (i).cpustat[CPUTIME_STEAL ]); os_data->os_cpu[j].cpu_id = i; j++; }
arch/x86/include/asm/pgtable_types.h +1 -1
@@ -134,7 +134,7 @@*/ #define _PAGE_CHG_MASK (PTE_PFN_MASK | _PAGE_PCD | _PAGE_PWT | \ _PAGE_SPECIAL | _PAGE_ACCESSED | _PAGE_DIRTY | \ - _PAGE_SOFT_DIRTY) + _PAGE_SOFT_DIRTY | _PAGE_DEVMAP)#define _HPAGE_CHG_MASK (_PAGE_CHG_MASK | _PAGE_PSE)/* The ASID is the lower 12 bits of CR3 */
drivers/clocksource/timer-ti-32k.c +3 -0
@@ -98,6 +98,9 @@ static int __init ti_32k_timer_init(struct device_node *np)return -ENXIO ; } +if (!of_machine_is_compatible ("ti,am43" )) + ti_32k_timer.cs.flags |=CLOCK_SOURCE_SUSPEND_NONSTOP ; + ti_32k_timer.counter = ti_32k_timer.base;/*
drivers/cpufreq/cpufreq.c +3 -3
@@ -132,7 +132,7 @@ static inline u64 get_cpu_idle_time_jiffy(unsigned int cpu, u64 *wall)u64 cur_wall_time;u64 busy_time; - cur_wall_time =jiffies64_to_cputime64 (get_jiffies_64 ()); + cur_wall_time =jiffies64_to_nsecs (get_jiffies_64 ()); busy_time =kcpustat_cpu (cpu).cpustat[CPUTIME_USER ]; busy_time +=kcpustat_cpu (cpu).cpustat[CPUTIME_SYSTEM ];
@@ -143,9 +143,9 @@ static inline u64 get_cpu_idle_time_jiffy(unsigned int cpu, u64 *wall) idle_time = cur_wall_time - busy_time;if (wall) - *wall =cputime_to_usecs (cur_wall_time); + *wall =div_u64 (cur_wall_time,NSEC_PER_USEC ); -return cputime_to_usecs (idle_time); +return div_u64 (idle_time,NSEC_PER_USEC ); }u64 get_cpu_idle_time (unsigned int cpu,u64 *wall,int io_busy)
drivers/cpufreq/cpufreq_governor.c +1 -1
@@ -152,7 +152,7 @@ unsigned int dbs_update(struct cpufreq_policy *policy)if (ignore_nice) {u64 cur_nice =kcpustat_cpu (j).cpustat[CPUTIME_NICE ]; - idle_time +=cputime_to_usecs (cur_nice - j_cdbs->prev_cpu_nice); + idle_time +=div_u64 (cur_nice - j_cdbs->prev_cpu_nice,NSEC_PER_USEC ); j_cdbs->prev_cpu_nice = cur_nice; }
drivers/cpufreq/cpufreq_stats.c +0 -1
@@ -13,7 +13,6 @@#include <linux/cpufreq.h> #include <linux/module.h> #include <linux/slab.h> -#include <linux/cputime.h> static DEFINE_SPINLOCK (cpufreq_stats_lock);
drivers/gpu/drm/arm/malidp_drv.c +1 -0
@@ -378,6 +378,7 @@ static int malidp_bind(struct device *dev) goto irq_init_fail; ret =drm_vblank_init (drm, drm->mode_config.num_crtc); +drm_crtc_vblank_reset (&malidp->crtc);if (ret <0 ) {DRM_ERROR ("failed to initialise vblank\n" ); goto vblank_fail;
drivers/hid/hid-core.c +3 -0
@@ -1853,6 +1853,9 @@ static const struct hid_device_id hid_have_special_driver[] = { { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO) }, { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_JIS) }, { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_ANSI) }, + { HID_BLUETOOTH_DEVICE(BT_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_ANSI) }, + { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_ANSI) }, + { HID_BLUETOOTH_DEVICE(BT_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_ANSI) }, { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) }, { HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) }, { HID_I2C_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_NOTEBOOK_KEYBOARD) },
drivers/hv/hv_kvp.c +8 -5
@@ -616,21 +616,22 @@ void hv_kvp_onchannelcallback(void *context)NEGO_IN_PROGRESS , NEGO_FINISHED} host_negotiatied = NEGO_NOT_STARTED; -if (host_negotiatied ==NEGO_NOT_STARTED && - kvp_transaction.state <HVUTIL_READY ) { +if (kvp_transaction.state <HVUTIL_READY ) {/* * If userspace daemon is not connected and host is asking * us to negotiate we need to delay to not lose messages. * This is important for Failover IP setting. */ - host_negotiatied =NEGO_IN_PROGRESS ; -schedule_delayed_work (&kvp_host_handshake_work, +if (host_negotiatied ==NEGO_NOT_STARTED ) { + host_negotiatied =NEGO_IN_PROGRESS ; +schedule_delayed_work (&kvp_host_handshake_work,HV_UTIL_NEGO_TIMEOUT *HZ ); + }return ; }if (kvp_transaction.state >HVUTIL_READY )return ; - +recheck:vmbus_recvpacket (channel, recv_buffer,PAGE_SIZE *4 , &recvlen, &requestid);
@@ -707,6 +708,8 @@ void hv_kvp_onchannelcallback(void *context) VM_PKT_DATA_INBAND, 0); host_negotiatied =NEGO_FINISHED ; + + goto recheck; } }
drivers/input/keyboard/atakbd.c +28 -46
111 lines not on this page · raw message
drivers/iommu/amd_iommu.c +6 -0
@@ -288,7 +288,13 @@ static u16 get_alias(struct device *dev)/* The callers make sure that get_device_id() does not fail here */ devid =get_device_id (dev); + +/* For ACPI HID devices, we simply return the devid as such */ +if (!dev_is_pci (dev)) +return devid; + ivrs_alias = amd_iommu_alias_table[devid]; +pci_for_each_dma_alias (pdev, __last_alias, &pci_alias);if (ivrs_alias == pci_alias)
drivers/macintosh/rack-meter.c +14 -14
@@ -52,8 +52,8 @@ struct rackmeter_dma {struct rackmeter_cpu {struct delayed_work sniffer;struct rackmeter *rm; -cputime64_t prev_wall; -cputime64_t prev_idle; +u64 prev_wall; +u64 prev_idle;int zero; }____cacheline_aligned ;
@@ -81,7 +81,7 @@ static int rackmeter_ignore_nice;/* This is copied from cpufreq_ondemand, maybe we should put it in * a common header somewhere */ -static inline cputime64_t get_cpu_idle_time (unsigned int cpu) +static inline u64 get_cpu_idle_time (unsigned int cpu) {u64 retval;
@@ -217,23 +217,23 @@ static void rackmeter_do_timer(struct work_struct *work) container_of(work, struct rackmeter_cpu, sniffer.work);struct rackmeter *rm = rcpu->rm;unsigned int cpu =smp_processor_id (); -cputime64_t cur_jiffies, total_idle_ticks; -unsigned int total_ticks, idle_ticks; +u64 cur_nsecs, total_idle_nsecs; +u64 total_nsecs, idle_nsecs;int i, offset, load, cumm, pause; - cur_jiffies =jiffies64_to_cputime64 (get_jiffies_64 ()); - total_ticks = (unsigned int ) (cur_jiffies - rcpu->prev_wall); - rcpu->prev_wall = cur_jiffies; + cur_nsecs =jiffies64_to_nsecs (get_jiffies_64 ()); + total_nsecs = cur_nsecs - rcpu->prev_wall; + rcpu->prev_wall = cur_nsecs; - total_idle_ticks =get_cpu_idle_time (cpu); - idle_ticks = (unsigned int ) (total_idle_ticks - rcpu->prev_idle); - idle_ticks =min (idle_ticks, total_ticks); - rcpu->prev_idle = total_idle_ticks; + total_idle_nsecs =get_cpu_idle_time (cpu); + idle_nsecs = total_idle_nsecs - rcpu->prev_idle; + idle_nsecs =min (idle_nsecs, total_nsecs); + rcpu->prev_idle = total_idle_nsecs;/* We do a very dumb calculation to update the LEDs for now, * we'll do better once we have actual PWM implemented */ - load = (9 * (total_ticks - idle_ticks)) / total_ticks; + load =div64_u64 (9 * (total_nsecs - idle_nsecs), total_nsecs); offset = cpu <<3 ; cumm =0 ;
@@ -278,7 +278,7 @@ static void rackmeter_init_cpu_sniffer(struct rackmeter *rm)continue ; rcpu = &rm->cpu[cpu]; rcpu->prev_idle =get_cpu_idle_time (cpu); - rcpu->prev_wall =jiffies64_to_cputime64 (get_jiffies_64 ()); + rcpu->prev_wall =jiffies64_to_nsecs (get_jiffies_64 ());schedule_delayed_work_on (cpu, &rm->cpu[cpu].sniffer,msecs_to_jiffies (CPU_SAMPLING_RATE )); }
drivers/media/usb/dvb-usb-v2/af9035.c +4 -2
@@ -406,8 +406,10 @@ static int af9035_i2c_master_xfer(struct i2c_adapter *adap, msg[0].addr == (state->af9033_i2c_addr[1] >> 1)) reg |=0x100000 ; - ret =af9035_wr_regs (d, reg, &msg[0 ].buf[3 ], - msg[0 ].len -3 ); + ret = (msg[0 ].len >=3 ) ?af9035_wr_regs (d, reg, + &msg[0 ].buf[3 ], + msg[0 ].len -3 ) + : -EOPNOTSUPP ; }else {/* I2C write */ u8 buf[MAX_XFER_SIZE ];
drivers/net/ethernet/mellanox/mlx4/eq.c +2 -1
@@ -240,7 +240,8 @@ static void mlx4_set_eq_affinity_hint(struct mlx4_priv *priv, int vec)struct mlx4_dev *dev = &priv->dev;struct mlx4_eq *eq = &priv->eq_table.eq[vec]; -if (!eq->affinity_mask ||cpumask_empty (eq->affinity_mask)) +if (!cpumask_available (eq->affinity_mask) || +cpumask_empty (eq->affinity_mask))return ; hint_err =irq_set_affinity_hint (eq->irq, eq->affinity_mask);
drivers/net/ethernet/renesas/ravb.h +5 -0
@@ -421,6 +421,7 @@ enum EIS_BIT {EIS_CULF1 =0x00000080 ,EIS_TFFF =0x00000100 ,EIS_QFS =0x00010000 , + EIS_RESERVED = (GENMASK(31, 17) | GENMASK(15, 11)), };/* RIC0 */
@@ -465,6 +466,7 @@ enum RIS0_BIT {RIS0_FRF15 =0x00008000 ,RIS0_FRF16 =0x00010000 ,RIS0_FRF17 =0x00020000 , + RIS0_RESERVED = GENMASK(31, 18), };/* RIC1 */
@@ -521,6 +523,7 @@ enum RIS2_BIT {RIS2_QFF16 =0x00010000 ,RIS2_QFF17 =0x00020000 ,RIS2_RFFF =0x80000000 , + RIS2_RESERVED = GENMASK(30, 18), };/* TIC */
@@ -537,6 +540,7 @@ enum TIS_BIT {TIS_FTF1 =0x00000002 ,/* Undocumented? */ TIS_TFUF =0x00000100 ,TIS_TFWF =0x00000200 , + TIS_RESERVED = (GENMASK(31, 20) | GENMASK(15, 12) | GENMASK(7, 4)) };/* ISS */
@@ -610,6 +614,7 @@ enum GIC_BIT {enum GIS_BIT {GIS_PTCF =0x00000001 ,/* Undocumented? */ GIS_PTMF =0x00000004 , +GIS_RESERVED =GENMASK (15 ,10 ), };/* GIE (R-Car Gen3 only) */
drivers/net/ethernet/renesas/ravb_main.c +6 -5
@@ -717,10 +717,11 @@ static void ravb_error_interrupt(struct net_device *ndev)u32 eis, ris2; eis =ravb_read (ndev,EIS ); -ravb_write (ndev, ~EIS_QFS ,EIS ); +ravb_write (ndev, ~(EIS_QFS |EIS_RESERVED ),EIS );if (eis &EIS_QFS ) { ris2 =ravb_read (ndev,RIS2 ); -ravb_write (ndev, ~(RIS2_QFF0 |RIS2_RFFF ),RIS2 ); +ravb_write (ndev, ~(RIS2_QFF0 |RIS2_RFFF |RIS2_RESERVED ), +RIS2 );/* Receive Descriptor Empty int */ if (ris2 &RIS2_QFF0 )
@@ -773,7 +774,7 @@ static bool ravb_timestamp_interrupt(struct net_device *ndev)u32 tis =ravb_read (ndev,TIS );if (tis &TIS_TFUF ) { -ravb_write (ndev, ~TIS_TFUF ,TIS ); +ravb_write (ndev, ~(TIS_TFUF |TIS_RESERVED ),TIS );ravb_get_tx_tstamp (ndev);return true; }
@@ -908,7 +909,7 @@ static int ravb_poll(struct napi_struct *napi, int budget)/* Processing RX Descriptor Ring */ if (ris0 & mask) {/* Clear RX interrupt */ -ravb_write (ndev, ~mask,RIS0 ); +ravb_write (ndev, ~(mask |RIS0_RESERVED ),RIS0 );if (ravb_rx (ndev, "a, q)) goto out; }
@@ -916,7 +917,7 @@ static int ravb_poll(struct napi_struct *napi, int budget)if (tis & mask) {spin_lock_irqsave (&priv->lock, flags);/* Clear TX interrupt */ -ravb_write (ndev, ~mask,TIS ); +ravb_write (ndev, ~(mask |TIS_RESERVED ),TIS );ravb_tx_free (ndev, q, true);netif_wake_subqueue (ndev, q);mmiowb ();
drivers/net/ethernet/renesas/ravb_ptp.c +1 -1
@@ -319,7 +319,7 @@ void ravb_ptp_interrupt(struct net_device *ndev) } } -ravb_write (ndev, ~gis,GIS ); +ravb_write (ndev, ~(gis |GIS_RESERVED ),GIS ); }void ravb_ptp_init (struct net_device *ndev,struct platform_device *pdev)
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c +2 -3
@@ -3342,11 +3342,10 @@ static int ibmvscsis_probe(struct vio_dev *vdev, vscsi->dds.window[LOCAL ].liobn, vscsi->dds.window[REMOTE].liobn); -strcpy (vscsi->eye,"VSCSI " ); -strncat (vscsi->eye, vdev->name,MAX_EYE ); +snprintf (vscsi->eye,sizeof (vscsi->eye),"VSCSI %s" , vdev->name); vscsi->dds.unit_id = vdev->unit_address; -strncpy (vscsi->dds.partition_name, partition_name, +strscpy (vscsi->dds.partition_name, partition_name,sizeof (vscsi->dds.partition_name)); vscsi->dds.partition_num = partition_number;
drivers/scsi/sd.c +2 -1
@@ -1158,7 +1158,8 @@ static int sd_init_command(struct scsi_cmnd *cmd)case REQ_OP_WRITE :return sd_setup_read_write_cmnd (cmd);default : -BUG (); +WARN_ON_ONCE (1 ); +return BLKPREP_KILL ; } }
drivers/usb/gadget/function/u_serial.c +1 -1
@@ -537,7 +537,7 @@ static void gs_rx_push(unsigned long _port) }/* push data to (open) tty */ -if (req->actual) { +if (req->actual && tty) {char *packet = req->buf;unsigned size = req->actual;unsigned n;
fs/ext4/ext4.h +0 -3
@@ -3038,9 +3038,6 @@ extern struct buffer_head *ext4_get_first_inline_block(struct inode *inode,extern int ext4_inline_data_fiemap (struct inode *inode,struct fiemap_extent_info *fieinfo,int *has_inline,__u64 start,__u64 len); -extern int ext4_try_to_evict_inline_data (handle_t *handle, -struct inode *inode, -int needed);extern void ext4_inline_data_truncate (struct inode *inode,int *has_inline);extern int ext4_convert_inline_data (struct inode *inode);
fs/ext4/inline.c +1 -37
@@ -889,11 +889,11 @@ int ext4_da_write_inline_data_begin(struct address_space *mapping, flags |=AOP_FLAG_NOFS ;if (ret == -ENOSPC ) { +ext4_journal_stop (handle); ret =ext4_da_convert_inline_data_to_extent (mapping, inode, flags, fsdata); -ext4_journal_stop (handle);if (ret == -ENOSPC &&ext4_should_retry_alloc (inode->i_sb, &retries)) goto retry_journal;
@@ -1865,42 +1865,6 @@ int ext4_inline_data_fiemap(struct inode *inode,return (error <0 ? error :0 ); } -/* -* Called during xattr set, and if we can sparse space 'needed', -* just create the extent tree evict the data to the outer block. -* -* We use jbd2 instead of page cache to move data to the 1st block -* so that the whole transaction can be committed as a whole and -* the data isn't lost because of the delayed page cache write. -*/ -int ext4_try_to_evict_inline_data (handle_t *handle, -struct inode *inode, -int needed) -{ -int error; -struct ext4_xattr_entry *entry; -struct ext4_inode *raw_inode; -struct ext4_iloc iloc; - - error =ext4_get_inode_loc (inode, &iloc); -if (error) -return error; - - raw_inode =ext4_raw_inode (&iloc); - entry = (struct ext4_xattr_entry *)((void *)raw_inode + -EXT4_I (inode)->i_inline_off); -if (EXT4_XATTR_LEN (entry->e_name_len) + -EXT4_XATTR_SIZE (le32_to_cpu (entry->e_value_size)) < needed) { - error = -ENOSPC ; - goto out; - } - - error =ext4_convert_inline_data_nolock (handle, inode, &iloc); -out: -brelse (iloc.bh); -return error; -} -void ext4_inline_data_truncate (struct inode *inode,int *has_inline) {handle_t *handle;
fs/ext4/xattr.c +2 -16
@@ -1086,22 +1086,8 @@ int ext4_xattr_ibody_inline_set(handle_t *handle, struct inode *inode,if (EXT4_I (inode)->i_extra_isize ==0 )return -ENOSPC ; error =ext4_xattr_set_entry (i, s, inode); -if (error) { -if (error == -ENOSPC && -ext4_has_inline_data (inode)) { - error =ext4_try_to_evict_inline_data (handle, inode, -EXT4_XATTR_LEN (strlen (i->name) + -EXT4_XATTR_SIZE (i->value_len))); -if (error) -return error; - error =ext4_xattr_ibody_find (inode, i, is); -if (error) -return error; - error =ext4_xattr_set_entry (i, s, inode); - } -if (error) -return error; - } +if (error) +return error; header =IHDR (inode,ext4_raw_inode (&is->iloc));if (!IS_LAST_ENTRY (s->first)) { header->h_magic =cpu_to_le32 (EXT4_XATTR_MAGIC );
fs/proc/stat.c +34 -34
121 lines not on this page · raw message
fs/proc/uptime.c +2 -5
@@ -5,23 +5,20 @@#include <linux/seq_file.h> #include <linux/time.h> #include <linux/kernel_stat.h> -#include <linux/cputime.h> static int uptime_proc_show (struct seq_file *m,void *v) {struct timespec uptime;struct timespec idle; -u64 idletime;u64 nsec;u32 rem;int i; - idletime =0 ; + nsec =0 ;for_each_possible_cpu (i) - idletime += (__force u64 )kcpustat_cpu (i).cpustat[CPUTIME_IDLE ]; + nsec += (__force u64 )kcpustat_cpu (i).cpustat[CPUTIME_IDLE ];get_monotonic_boottime (&uptime); - nsec =cputime64_to_jiffies64 (idletime) *TICK_NSEC ; idle.tv_sec =div_u64_rem (nsec,NSEC_PER_SEC , &rem); idle.tv_nsec = rem; seq_printf(m, "%lu.%02lu %lu.%02lu\n",
include/linux/huge_mm.h +1 -1
@@ -22,7 +22,7 @@ extern int mincore_huge_pmd(struct vm_area_struct *vma, pmd_t *pmd, unsigned char *vec);extern bool move_huge_pmd (struct vm_area_struct *vma,unsigned long old_addr,unsigned long new_addr,unsigned long old_end, -pmd_t *old_pmd,pmd_t *new_pmd,bool *need_flush); +pmd_t *old_pmd,pmd_t *new_pmd);extern int change_huge_pmd (struct vm_area_struct *vma,pmd_t *pmd,unsigned long addr,pgprot_t newprot,int prot_numa);
kernel/sched/cpuacct.c +1 -1
@@ -297,7 +297,7 @@ static int cpuacct_stats_show(struct seq_file *sf, void *v)for (stat =0 ; stat <CPUACCT_STAT_NSTATS ; stat++) {seq_printf (sf,"%s %lld\n" , cpuacct_stat_desc[stat], -cputime64_to_clock_t (val[stat])); +nsec_to_clock_t (val[stat])); }return 0 ;
kernel/sched/cputime.c +32 -43
144 lines not on this page · raw message
kernel/sched/sched.h +9 -3
@@ -4,6 +4,7 @@#include <linux/sched/rt.h> #include <linux/u64_stats_sync.h> #include <linux/sched/deadline.h> +#include <linux/kernel_stat.h> #include <linux/binfmts.h> #include <linux/mutex.h> #include <linux/spinlock.h>
@@ -1742,14 +1743,19 @@ static inline void nohz_balance_exit_idle(unsigned int cpu) { }#ifdef CONFIG_IRQ_TIME_ACCOUNTING struct irqtime { -u64 hardirq_time; -u64 softirq_time; +u64 total; +u64 tick_delta;u64 irq_start_time;struct u64_stats_sync sync; }; DECLARE_PER_CPU(struct irqtime, cpu_irqtime); +/* +* Returns the irqtime minus the softirq time computed by ksoftirqd. +* Otherwise ksoftirqd's sum_exec_runtime is substracted its own runtime +* and never move forward. +*/ static inline u64 irq_time_read (int cpu) {struct irqtime *irqtime = &per_cpu (cpu_irqtime, cpu);
@@ -1758,7 +1764,7 @@ static inline u64 irq_time_read(int cpu)do { seq =__u64_stats_fetch_begin (&irqtime->sync); - total = irqtime->softirq_time + irqtime->hardirq_time; + total = irqtime->total; }while (__u64_stats_fetch_retry (&irqtime->sync, seq));return total;
mm/huge_memory.c +4 -6
@@ -1445,7 +1445,7 @@ int zap_huge_pmd(struct mmu_gather *tlb, struct vm_area_struct *vma,bool move_huge_pmd (struct vm_area_struct *vma,unsigned long old_addr,unsigned long new_addr,unsigned long old_end, -pmd_t *old_pmd,pmd_t *new_pmd,bool *need_flush) +pmd_t *old_pmd,pmd_t *new_pmd) {spinlock_t *old_ptl, *new_ptl;pmd_t pmd;
@@ -1476,7 +1476,7 @@ bool move_huge_pmd(struct vm_area_struct *vma, unsigned long old_addr,if (new_ptl != old_ptl)spin_lock_nested (new_ptl,SINGLE_DEPTH_NESTING ); pmd =pmdp_huge_get_and_clear (mm, old_addr, old_pmd); -if (pmd_present (pmd) &&pmd_dirty (pmd)) +if (pmd_present (pmd)) force_flush = true;VM_BUG_ON (!pmd_none (*new_pmd));
@@ -1487,12 +1487,10 @@ bool move_huge_pmd(struct vm_area_struct *vma, unsigned long old_addr,pgtable_trans_huge_deposit (mm, new_pmd, pgtable); }set_pmd_at (mm, new_addr, new_pmd,pmd_mksoft_dirty (pmd)); -if (new_ptl != old_ptl) -spin_unlock (new_ptl);if (force_flush)flush_tlb_range (vma, old_addr, old_addr +PMD_SIZE ); -else - *need_flush = true; +if (new_ptl != old_ptl) +spin_unlock (new_ptl);spin_unlock (old_ptl);return true; }
mm/mremap.c +13 -17
@@ -104,7 +104,7 @@ static pte_t move_soft_dirty_pte(pte_t pte)static void move_ptes (struct vm_area_struct *vma,pmd_t *old_pmd,unsigned long old_addr,unsigned long old_end,struct vm_area_struct *new_vma,pmd_t *new_pmd, -unsigned long new_addr,bool need_rmap_locks,bool *need_flush) +unsigned long new_addr,bool need_rmap_locks) {struct mm_struct *mm = vma->vm_mm;pte_t *old_pte, *new_pte, pte;
@@ -152,15 +152,17 @@ static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd, pte =ptep_get_and_clear (mm, old_addr, old_pte);/* -* If we are remapping a dirty PTE, make sure +* If we are remapping a valid PTE, make sure * to flush TLB before we drop the PTL for the -* old PTE or we may race with page_mkclean(). +* PTE. * -* This check has to be done after we removed the -* old PTE from page tables or another thread may -* dirty it after the check and before the removal. +* NOTE! Both old and new PTL matter: the old one +* for racing with page_mkclean(), the new one to +* make sure the physical page stays valid until +* the TLB entry for the old mapping has been +* flushed. */ -if (pte_present (pte) &&pte_dirty (pte)) +if (pte_present (pte)) force_flush = true; pte =move_pte (pte, new_vma->vm_page_prot, old_addr, new_addr); pte =move_soft_dirty_pte (pte);
@@ -168,13 +170,11 @@ static void move_ptes(struct vm_area_struct *vma, pmd_t *old_pmd, }arch_leave_lazy_mmu_mode (); +if (force_flush) +flush_tlb_range (vma, old_end - len, old_end);if (new_ptl != old_ptl)spin_unlock (new_ptl);pte_unmap (new_pte -1 ); -if (force_flush) -flush_tlb_range (vma, old_end - len, old_end); -else - *need_flush = true;pte_unmap_unlock (old_pte -1 , old_ptl);if (need_rmap_locks)drop_rmap_locks (vma);
@@ -189,7 +189,6 @@ unsigned long move_page_tables(struct vm_area_struct *vma, {unsigned long extent, next, old_end;pmd_t *old_pmd, *new_pmd; -bool need_flush = false;unsigned long mmun_start;/* For mmu_notifiers */ unsigned long mmun_end;/* For mmu_notifiers */
@@ -220,8 +219,7 @@ unsigned long move_page_tables(struct vm_area_struct *vma,if (need_rmap_locks)take_rmap_locks (vma); moved =move_huge_pmd (vma, old_addr, new_addr, - old_end, old_pmd, new_pmd, - &need_flush); + old_end, old_pmd, new_pmd);if (need_rmap_locks)drop_rmap_locks (vma);if (moved)
@@ -239,10 +237,8 @@ unsigned long move_page_tables(struct vm_area_struct *vma,if (extent >LATENCY_LIMIT ) extent =LATENCY_LIMIT ;move_ptes (vma, old_pmd, old_addr, old_addr + extent, new_vma, - new_pmd, new_addr, need_rmap_locks, &need_flush); + new_pmd, new_addr, need_rmap_locks); } -if (need_flush) -flush_tlb_range (vma, old_end-len, old_addr);mmu_notifier_invalidate_range_end (vma->vm_mm, mmun_start, mmun_end);
net/batman-adv/bat_v_elp.c +6 -2
@@ -243,6 +243,7 @@ static void batadv_v_elp_periodic_work(struct work_struct *work)struct batadv_priv *bat_priv;struct sk_buff *skb;u32 elp_interval; +bool ret; bat_v = container_of(work, struct batadv_hard_iface_bat_v, elp_wq.work); hard_iface = container_of(bat_v, struct batadv_hard_iface, bat_v);
@@ -304,8 +305,11 @@ static void batadv_v_elp_periodic_work(struct work_struct *work)* may sleep and that is not allowed in an rcu protected * context. Therefore schedule a task for that. */ -queue_work (batadv_event_workqueue, - &hardif_neigh->bat_v.metric_work); + ret =queue_work (batadv_event_workqueue, + &hardif_neigh->bat_v.metric_work); + +if (!ret) +batadv_hardif_neigh_put (hardif_neigh); }rcu_read_unlock ();
net/batman-adv/bridge_loop_avoidance.c +8 -2
@@ -1767,6 +1767,7 @@ batadv_bla_loopdetect_check(struct batadv_priv *bat_priv, struct sk_buff *skb, {struct batadv_bla_backbone_gw *backbone_gw;struct ethhdr *ethhdr; +bool ret; ethhdr =eth_hdr (skb);
@@ -1790,8 +1791,13 @@ batadv_bla_loopdetect_check(struct batadv_priv *bat_priv, struct sk_buff *skb,if (unlikely (!backbone_gw))return true; -queue_work (batadv_event_workqueue, &backbone_gw->report_work); -/* backbone_gw is unreferenced in the report work function function */ + ret =queue_work (batadv_event_workqueue, &backbone_gw->report_work); + +/* backbone_gw is unreferenced in the report work function function +* if queue_work() call was successful +*/ +if (!ret) +batadv_backbone_gw_put (backbone_gw);return true; }
net/batman-adv/network-coding.c +15 -12
@@ -845,16 +845,27 @@ batadv_nc_get_nc_node(struct batadv_priv *bat_priv,spinlock_t *lock;/* Used to lock list selected by "int in_coding" */ struct list_head *list; +/* Select ingoing or outgoing coding node */ +if (in_coding) { + lock = &orig_neigh_node->in_coding_list_lock; + list = &orig_neigh_node->in_coding_list; + }else { + lock = &orig_neigh_node->out_coding_list_lock; + list = &orig_neigh_node->out_coding_list; + } + +spin_lock_bh (lock); +/* Check if nc_node is already added */ nc_node =batadv_nc_find_nc_node (orig_node, orig_neigh_node, in_coding);/* Node found */ if (nc_node) -return nc_node; + goto unlock; nc_node =kzalloc (sizeof (*nc_node),GFP_ATOMIC );if (!nc_node) -return NULL ; + goto unlock;/* Initialize nc_node */ INIT_LIST_HEAD (&nc_node->list);
@@ -863,22 +874,14 @@ batadv_nc_get_nc_node(struct batadv_priv *bat_priv,kref_get (&orig_neigh_node->refcount); nc_node->orig_node = orig_neigh_node; -/* Select ingoing or outgoing coding node */ -if (in_coding) { - lock = &orig_neigh_node->in_coding_list_lock; - list = &orig_neigh_node->in_coding_list; - }else { - lock = &orig_neigh_node->out_coding_list_lock; - list = &orig_neigh_node->out_coding_list; - } -batadv_dbg (BATADV_DBG_NC , bat_priv,"Adding nc_node %pM -> %pM\n" , nc_node->addr, nc_node->orig_node->orig);/* Add nc_node to orig_node */ -spin_lock_bh (lock);kref_get (&nc_node->refcount);list_add_tail_rcu (&nc_node->list, list); + +unlock:spin_unlock_bh (lock);return nc_node;
net/batman-adv/soft-interface.c +18 -7
@@ -565,15 +565,20 @@ int batadv_softif_create_vlan(struct batadv_priv *bat_priv, unsigned short vid)struct batadv_softif_vlan *vlan;int err; +spin_lock_bh (&bat_priv->softif_vlan_list_lock); + vlan =batadv_softif_vlan_get (bat_priv, vid);if (vlan) {batadv_softif_vlan_put (vlan); +spin_unlock_bh (&bat_priv->softif_vlan_list_lock);return -EEXIST ; } vlan =kzalloc (sizeof (*vlan),GFP_ATOMIC ); -if (!vlan) +if (!vlan) { +spin_unlock_bh (&bat_priv->softif_vlan_list_lock);return -ENOMEM ; + } vlan->bat_priv = bat_priv; vlan->vid = vid;
@@ -581,17 +586,23 @@ int batadv_softif_create_vlan(struct batadv_priv *bat_priv, unsigned short vid)atomic_set (&vlan->ap_isolation,0 ); +kref_get (&vlan->refcount); +hlist_add_head_rcu (&vlan->list, &bat_priv->softif_vlan_list); +spin_unlock_bh (&bat_priv->softif_vlan_list_lock); + +/* batadv_sysfs_add_vlan cannot be in the spinlock section due to the +* sleeping behavior of the sysfs functions and the fs_reclaim lock +*/ err =batadv_sysfs_add_vlan (bat_priv->soft_iface, vlan);if (err) { -kfree (vlan); +/* ref for the function */ +batadv_softif_vlan_put (vlan); + +/* ref for the list */ +batadv_softif_vlan_put (vlan);return err; } -spin_lock_bh (&bat_priv->softif_vlan_list_lock); -kref_get (&vlan->refcount); -hlist_add_head_rcu (&vlan->list, &bat_priv->softif_vlan_list); -spin_unlock_bh (&bat_priv->softif_vlan_list_lock); -/* add a new TT local entry. This one will be marked with the NOPURGE * flag */
net/batman-adv/sysfs.c +20 -10
@@ -187,7 +187,8 @@ ssize_t batadv_store_##_name(struct kobject *kobj, \ \return __batadv_store_uint_attr (buff, count, _min, _max, \ _post_func, attr, \ - &bat_priv->_var, net_dev); \ + &bat_priv->_var, net_dev, \ +NULL ); \ }#define BATADV_ATTR_SIF_SHOW_UINT (_name, _var) \
@@ -261,7 +262,9 @@ ssize_t batadv_store_##_name(struct kobject *kobj, \ \ length =__batadv_store_uint_attr (buff, count, _min, _max, \ _post_func, attr, \ - &hard_iface->_var, net_dev); \ + &hard_iface->_var, \ + hard_iface->soft_iface, \ + net_dev); \ \batadv_hardif_put (hard_iface); \return length; \
@@ -355,10 +358,12 @@ __batadv_store_bool_attr(char *buff, size_t count,static int batadv_store_uint_attr (const char *buff,size_t count,struct net_device *net_dev, +struct net_device *slave_dev,const char *attr_name,unsigned int min,unsigned int max,atomic_t *attr) { +char ifname[IFNAMSIZ +3 ] ="" ;unsigned long uint_val;int ret;
@@ -384,8 +389,11 @@ static int batadv_store_uint_attr(const char *buff, size_t count,if (atomic_read (attr) == uint_val)return count; -batadv_info (net_dev,"%s: Changing from: %i to: %lu\n" , - attr_name,atomic_read (attr), uint_val); +if (slave_dev) +snprintf (ifname,sizeof (ifname),"%s: " , slave_dev->name); + +batadv_info (net_dev,"%s: %sChanging from: %i to: %lu\n" , + attr_name, ifname,atomic_read (attr), uint_val);atomic_set (attr, uint_val);return count;
@@ -396,12 +404,13 @@ static ssize_t __batadv_store_uint_attr(const char *buff, size_t count,void (*post_func)(struct net_device *), const struct attribute *attr, atomic_t *attr_store, - struct net_device *net_dev) + struct net_device *net_dev, + struct net_device *slave_dev) { int ret; - ret =batadv_store_uint_attr (buff, count, net_dev, attr->name, min, max, - attr_store); + ret =batadv_store_uint_attr (buff, count, net_dev, slave_dev, + attr->name, min, max, attr_store);if (post_func && ret)post_func (net_dev);
@@ -570,7 +579,7 @@ static ssize_t batadv_store_gw_sel_class(struct kobject *kobj,return __batadv_store_uint_attr (buff, count,1 ,BATADV_TQ_MAX_VALUE , batadv_post_gw_reselect, attr, &bat_priv->gw.sel_class, - bat_priv->soft_iface); + bat_priv->soft_iface,NULL ); } static ssize_t batadv_show_gw_bwidth(struct kobject *kobj,
@@ -1084,8 +1093,9 @@ static ssize_t batadv_store_throughput_override(struct kobject *kobj,if (old_tp_override == tp_override) goto out; -batadv_info (net_dev,"%s: Changing from: %u.%u MBit to: %u.%u MBit\n" , -"throughput_override" , +batadv_info (hard_iface->soft_iface, +"%s: %s: Changing from: %u.%u MBit to: %u.%u MBit\n" , +"throughput_override" , net_dev->name, old_tp_override /10 , old_tp_override %10 , tp_override /10 , tp_override %10 );
net/batman-adv/translation-table.c +4 -2
@@ -1550,6 +1550,8 @@ batadv_tt_global_orig_entry_add(struct batadv_tt_global_entry *tt_global, {struct batadv_tt_orig_list_entry *orig_entry; +spin_lock_bh (&tt_global->list_lock); + orig_entry =batadv_tt_global_orig_entry_find (tt_global, orig_node);if (orig_entry) {/* refresh the ttvn: the current value could be a bogus one that
@@ -1570,16 +1572,16 @@ batadv_tt_global_orig_entry_add(struct batadv_tt_global_entry *tt_global, orig_entry->ttvn = ttvn;kref_init (&orig_entry->refcount); -spin_lock_bh (&tt_global->list_lock);kref_get (&orig_entry->refcount);hlist_add_head_rcu (&orig_entry->list, &tt_global->orig_list); -spin_unlock_bh (&tt_global->list_lock);atomic_inc (&tt_global->orig_list_count); out:if (orig_entry)batadv_tt_orig_list_entry_put (orig_entry); + +spin_unlock_bh (&tt_global->list_lock); }/**
net/batman-adv/tvlv.c +6 -2
@@ -528,15 +528,20 @@ void batadv_tvlv_handler_register(struct batadv_priv *bat_priv, {struct batadv_tvlv_handler *tvlv_handler; +spin_lock_bh (&bat_priv->tvlv.handler_list_lock); + tvlv_handler =batadv_tvlv_handler_get (bat_priv, type, version);if (tvlv_handler) { +spin_unlock_bh (&bat_priv->tvlv.handler_list_lock);batadv_tvlv_handler_put (tvlv_handler);return ; } tvlv_handler =kzalloc (sizeof (*tvlv_handler),GFP_ATOMIC ); -if (!tvlv_handler) +if (!tvlv_handler) { +spin_unlock_bh (&bat_priv->tvlv.handler_list_lock);return ; + } tvlv_handler->ogm_handler = optr; tvlv_handler->unicast_handler = uptr;
@@ -546,7 +551,6 @@ void batadv_tvlv_handler_register(struct batadv_priv *bat_priv,kref_init (&tvlv_handler->refcount);INIT_HLIST_NODE (&tvlv_handler->list); -spin_lock_bh (&bat_priv->tvlv.handler_list_lock);kref_get (&tvlv_handler->refcount);hlist_add_head_rcu (&tvlv_handler->list, &bat_priv->tvlv.handler_list);spin_unlock_bh (&bat_priv->tvlv.handler_list_lock);
net/netfilter/nf_nat_core.c +1 -1
@@ -421,7 +421,7 @@ nf_nat_setup_info(struct nf_conn *ct,else ct->status |=IPS_DST_NAT ; -if (nfct_help (ct)) +if (nfct_help (ct) && !nfct_seqadj (ct))if (!nfct_seqadj_ext_add (ct))return NF_DROP ; }