Linux 4.19.245
Greg Kroah-Hartman
maintainerI'm announcing the release of the 4.19.245 kernel.
All users of the 4.19 kernel series must upgrade.
The updated 4.19.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.19.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/arm/kernel/entry-armv.S | 2 arch/arm/kernel/stacktrace.c | 10 arch/arm/mm/proc-v7-bugs.c | 1 arch/mips/lantiq/falcon/sysctrl.c | 2 arch/mips/lantiq/xway/gptu.c | 2 arch/mips/lantiq/xway/sysctrl.c | 46 ++-- arch/x86/um/shared/sysdep/syscalls_64.h | 5 drivers/block/drbd/drbd_main.c | 7 drivers/block/floppy.c | 17 - drivers/clk/at91/clk-generated.c | 4 drivers/crypto/qcom-rng.c | 1 drivers/crypto/stm32/stm32_crc32.c | 4 drivers/gpio/gpio-mvebu.c | 3 drivers/gpio/gpio-vf610.c | 8 drivers/gpu/drm/drm_dp_mst_topology.c | 1 drivers/input/input.c | 19 + drivers/input/touchscreen/stmfts.c | 8 drivers/mmc/core/block.c | 8 drivers/mmc/core/card.h | 6 drivers/mmc/core/mmc.c | 6 drivers/mmc/core/mmc_ops.c | 110 ++------- drivers/mmc/core/mmc_ops.h | 3 drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c | 7 drivers/net/ethernet/cadence/macb_main.c | 2 drivers/net/ethernet/dec/tulip/tulip_core.c | 5 drivers/net/ethernet/intel/igb/igb_main.c | 3 drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 7 drivers/net/ethernet/qlogic/qla3xxx.c | 3 drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 4 drivers/net/vmxnet3/vmxnet3_drv.c | 6 drivers/pci/pci.c | 10 drivers/scsi/qla2xxx/qla_target.c | 3 drivers/vhost/net.c | 15 - fs/afs/inode.c | 14 + fs/nilfs2/btnode.c | 23 +- fs/nilfs2/btnode.h | 1 fs/nilfs2/btree.c | 27 +- fs/nilfs2/dat.c | 4 fs/nilfs2/gcinode.c | 7 fs/nilfs2/inode.c | 159 ++++++++++++-- fs/nilfs2/mdt.c | 43 ++- fs/nilfs2/mdt.h | 6 fs/nilfs2/nilfs.h | 16 - fs/nilfs2/page.c | 7 fs/nilfs2/segment.c | 9 fs/nilfs2/super.c | 5 kernel/dma/swiotlb.c | 12 - kernel/events/core.c | 14 + net/bridge/br_input.c | 7 net/key/af_key.c | 6 net/mac80211/rx.c | 3 net/nfc/nci/data.c | 2 net/nfc/nci/hci.c | 4 net/sched/act_pedit.c | 4 sound/isa/wavefront/wavefront_synth.c | 3 tools/perf/bench/numa.c | 2 57 files changed, 482 insertions(+), 236 deletions(-)
Al Viro (1):
Fix double fget() in vhost_net_set_backend()
Andrew Lunn (1):
net: bridge: Clear offload_fwd_mark when passing frame up bridge interface.
Ard Biesheuvel (2):
ARM: 9196/1: spectre-bhb: enable for Cortex-A15
ARM: 9197/1: spectre-bhb: fix loop8 sequence for Thumb2
Christophe JAILLET (1):
net/qla3xxx: Fix a test in ql_reset_work()
Codrin Ciubotariu (1):
clk: at91: generated: consider range when calculating best rate
David Gow (1):
um: Cleanup syscall_handler_t definition/cast, fix warning
David Howells (1):
afs: Fix afs_getattr() to refetch file status if callback break occurred
Duoming Zhou (1):
NFC: nci: fix sleep in atomic context bugs caused by nci_skb_alloc
Felix Fietkau (1):
mac80211: fix rx reordering with non explicit / psmp ack policy
Gleb Chesnokov (1):
scsi: qla2xxx: Fix missed DMA unmap for aborted commands
Grant Grundler (1):
net: atlantic: verify hw_head_ lies within TX buffer ring
Greg Kroah-Hartman (1):
Linux 4.19.245
Haibo Chen (1):
gpio: gpio-vf610: do not touch other bits when set the target bit
Halil Pasic (1):
swiotlb: fix info leak with DMA_FROM_DEVICE
Hangyu Hua (1):
drm/dp/mst: fix a possible memory leak in fetch_monitor_name()
Harini Katakam (1):
net: macb: Increment rx bd head after allocating skb and buffer
Jakob Koschel (1):
drbd: remove usage of list iterator variable after loop
Jeff LaBundy (1):
Input: add bounds checking to input_set_capability()
Jiasheng Jiang (1):
net: af_key: add check for pfkey_broadcast in function pfkey_process
Kevin Mitchell (1):
igb: skip phy status check where unavailable
Linus Torvalds (1):
Reinstate some of "swiotlb: rework "fix info leak with DMA_FROM_DEVICE""
Maxim Mikityanskiy (1):
net/mlx5e: Properly block LRO when XDP is enabled
Ondrej Mosnacek (1):
crypto: qcom-rng - fix infinite loop on requests not multiple of WORD_SZ
Paolo Abeni (1):
net/sched: act_pedit: sanitize shift argument before usage
Peter Zijlstra (1):
perf: Fix sys_perf_event_open() race against self
Rafael J. Wysocki (1):
PCI/PM: Avoid putting Elo i2 PCIe Ports in D3cold
Ryusuke Konishi (2):
nilfs2: fix lockdep warnings in page operations for btree nodes
nilfs2: fix lockdep warnings during disk space reclamation
Takashi Iwai (1):
ALSA: wavefront: Proper check of get_user() error
Thomas Richter (1):
perf bench numa: Address compiler error on s390
Ulf Hansson (4):
mmc: core: Cleanup BKOPS support
mmc: core: Specify timeouts for BKOPS and CACHE_FLUSH for eMMC
mmc: block: Use generic_cmd6_time when modifying INAND_CMD38_ARG_EXT_CSD
mmc: core: Default to generic_cmd6_time as timeout in __mmc_switch()
Uwe Kleine-König (1):
gpio: mvebu/pwm: Refuse requests with inverted polarity
Willy Tarreau (1):
floppy: use a statically allocated error counter
Xiaoke Wang (1):
MIPS: lantiq: check the return value of kzalloc()
Yang Yingliang (2):
ethernet: tulip: fix missing pci_disable_device() on error in tulip_init_one()
net: stmmac: fix missing pci_disable_device() on error in stmmac_pci_probe()
Zheng Yongjun (2):
Input: stmfts - fix reference leak in stmfts_input_open
crypto: stm32 - fix reference leak in stm32_crc_remove
Zixuan Fu (2):
net: vmxnet3: fix possible use-after-free bugs in vmxnet3_rq_alloc_rx_buf()
net: vmxnet3: fix possible NULL pointer dereference in vmxnet3_rq_cleanup()
linyujun (1):
ARM: 9191/1: arm/stacktrace, kasan: Silence KASAN warnings in unwind_frame()
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 19 -SUBLEVEL = 244 +SUBLEVEL = 245 EXTRAVERSION = NAME = "People's Front"
arch/arm/kernel/entry-armv.S +1 -1
@@ -1067,7 +1067,7 @@ vector_bhb_loop8_\name: @ bhb workaround mov r0, #8 -3: b . + 4 +3: W(b) . + 4 subs r0, r0, #1 bne 3b dsb
arch/arm/kernel/stacktrace.c +5 -5
@@ -52,17 +52,17 @@ int notrace unwind_frame(struct stackframe *frame)return -EINVAL ; frame->sp = frame->fp; - frame->fp = *(unsigned long *)(fp); - frame->pc = *(unsigned long *)(fp +4 ); + frame->fp =READ_ONCE_NOCHECK (*(unsigned long *)(fp)); + frame->pc =READ_ONCE_NOCHECK (*(unsigned long *)(fp +4 ));#else /* check current frame pointer is within bounds */ if (fp < low +12 || fp > high -4 )return -EINVAL ;/* restore the registers from the stack frame */ - frame->fp = *(unsigned long *)(fp -12 ); - frame->sp = *(unsigned long *)(fp -8 ); - frame->pc = *(unsigned long *)(fp -4 ); + frame->fp =READ_ONCE_NOCHECK (*(unsigned long *)(fp -12 )); + frame->sp =READ_ONCE_NOCHECK (*(unsigned long *)(fp -8 )); + frame->pc =READ_ONCE_NOCHECK (*(unsigned long *)(fp -4 ));#endif return 0 ;
arch/arm/mm/proc-v7-bugs.c +1 -0
@@ -302,6 +302,7 @@ void cpu_v7_ca15_ibe(void) {if (check_spectre_auxcr (this_cpu_ptr (&spectre_warned),BIT (0 )))cpu_v7_spectre_v2_init (); +cpu_v7_spectre_bhb_init (); }void cpu_v7_bugs_init (void )
arch/mips/lantiq/falcon/sysctrl.c +2 -0
@@ -169,6 +169,8 @@ static inline void clkdev_add_sys(const char *dev, unsigned int module, {struct clk *clk =kzalloc (sizeof (struct clk ),GFP_KERNEL ); +if (!clk) +return ; clk->cl.dev_id = dev; clk->cl.con_id =NULL ; clk->cl.clk = clk;
arch/mips/lantiq/xway/gptu.c +2 -0
@@ -124,6 +124,8 @@ static inline void clkdev_add_gptu(struct device *dev, const char *con, {struct clk *clk =kzalloc (sizeof (struct clk ),GFP_KERNEL ); +if (!clk) +return ; clk->cl.dev_id =dev_name (dev); clk->cl.con_id = con; clk->cl.clk = clk;
arch/mips/lantiq/xway/sysctrl.c +30 -16
75 lines not on this page · raw message
arch/x86/um/shared/sysdep/syscalls_64.h +2 -3
@@ -10,13 +10,12 @@#include <linux/msg.h> #include <linux/shm.h> -typedef long syscall_handler_t (void ); +typedef long syscall_handler_t (long ,long ,long ,long ,long ,long );extern syscall_handler_t *sys_call_table[];#define EXECUTE_SYSCALL (syscall, regs) \ - (((long (*)(long, long, long, long, long, long)) \ - (*sys_call_table[syscall]))(UPT_SYSCALL_ARG1(®s->regs), \ + (((*sys_call_table[syscall]))(UPT_SYSCALL_ARG1(®s->regs), \ UPT_SYSCALL_ARG2(®s->regs), \ UPT_SYSCALL_ARG3(®s->regs), \ UPT_SYSCALL_ARG4(®s->regs), \
drivers/block/drbd/drbd_main.c +5 -2
@@ -195,7 +195,7 @@ void tl_release(struct drbd_connection *connection, unsigned int barrier_nr, unsigned int set_size) {struct drbd_request *r; -struct drbd_request *req =NULL ; +struct drbd_request *req =NULL , *tmp =NULL ;int expect_epoch =0 ;int expect_size =0 ;
@@ -249,8 +249,11 @@ void tl_release(struct drbd_connection *connection, unsigned int barrier_nr,* to catch requests being barrier-acked "unexpectedly". * It usually should find the same req again, or some READ preceding it. */ list_for_each_entry (req, &connection->transfer_log, tl_requests) -if (req->epoch == expect_epoch) +if (req->epoch == expect_epoch) { + tmp = req;break ; + } + req =list_prepare_entry (tmp, &connection->transfer_log, tl_requests);list_for_each_entry_safe_from (req, r, &connection->transfer_log, tl_requests) {if (req->epoch != expect_epoch)break ;
drivers/block/floppy.c +7 -10
@@ -520,8 +520,8 @@ static unsigned long fdc_busy;static DECLARE_WAIT_QUEUE_HEAD (fdc_wait);static DECLARE_WAIT_QUEUE_HEAD (command_done); -/* Errors during formatting are counted here. */ -static int format_errors; +/* errors encountered on the current (or last) request */ +static int floppy_errors;/* Format request descriptor. */ static struct format_descr format_req;
@@ -541,7 +541,6 @@ static struct format_descr format_req;static char *floppy_track_buffer;static int max_buffer_sectors; -static int *errors;typedef void (*done_f )(int ); static const struct cont_t { void (*interrupt)(void);
@@ -1434,7 +1433,7 @@ static int interpret_errors(void)if (DP ->flags &FTD_MSG )DPRINT ("Over/Underrun - retrying\n" ); bad =0 ; - }else if (*errors >=DP ->max_errors.reporting) { + }else if (floppy_errors >=DP ->max_errors.reporting) {print_errors (); }if (ST2 &ST2_WC ||ST2 &ST2_BC )
@@ -2054,7 +2053,7 @@ static void bad_flp_intr(void)if (!next_valid_format ())return ; } - err_count = ++(*errors); + err_count = ++floppy_errors;INFBOUND (DRWE ->badness, err_count);if (err_count >DP ->max_errors.abort) cont->done (0 );
@@ -2199,9 +2198,8 @@ static int do_format(int drive, struct format_descr *tmp_format_req)return -EINVAL ; } format_req = *tmp_format_req; - format_errors =0 ; cont = &format_cont; - errors = &format_errors; + floppy_errors =0 ; ret =wait_til_done (redo_format, true);if (ret == -EINTR )return -EINTR ;
@@ -2684,7 +2682,7 @@ static int make_raw_rw_request(void)*/ if (!direct || (indirect *2 > direct *3 && - *errors <DP ->max_errors.read_track && + floppy_errors <DP ->max_errors.read_track && ((!probing || (DP ->read_track & (1 <<DRS ->probed_format)))))) { max_size =blk_rq_sectors (current_req);
@@ -2818,7 +2816,7 @@ static int set_next_request(void)if (q) { current_req =blk_fetch_request (q);if (current_req) { - current_req->error_count =0 ; + floppy_errors =0 ;break ; } }
@@ -2880,7 +2878,6 @@ static void redo_fd_request(void) _floppy = floppy_type +DP ->autodetect[DRS ->probed_format]; }else probing =0 ; - errors = &(current_req->error_count); tmp =make_raw_rw_request ();if (tmp <2 ) {request_done (tmp);
drivers/clk/at91/clk-generated.c +4 -0
@@ -119,6 +119,10 @@ static void clk_generated_best_diff(struct clk_rate_request *req, tmp_rate = parent_rate; else tmp_rate = parent_rate / div; + +if (tmp_rate < req->min_rate || tmp_rate > req->max_rate) +return ; + tmp_diff =abs (req->rate - tmp_rate);if (*best_diff <0 || *best_diff > tmp_diff) {
drivers/crypto/qcom-rng.c +1 -0
@@ -64,6 +64,7 @@ static int qcom_rng_read(struct qcom_rng *rng, u8 *data, unsigned int max) }else {/* copy only remaining bytes */ memcpy (data, &val, max - currsize); +break ; } }while (currsize < max);
drivers/crypto/stm32/stm32_crc32.c +3 -1
@@ -334,8 +334,10 @@ static int stm32_crc_remove(struct platform_device *pdev)struct stm32_crc *crc =platform_get_drvdata (pdev);int ret =pm_runtime_get_sync (crc->dev); -if (ret <0 ) +if (ret <0 ) { +pm_runtime_put_noidle (crc->dev);return ret; + }spin_lock (&crc_list.lock);list_del (&crc->list);
drivers/gpio/gpio-mvebu.c +3 -0
@@ -690,6 +690,9 @@ static int mvebu_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,unsigned long flags;unsigned int on, off; +if (state->polarity !=PWM_POLARITY_NORMAL ) +return -EINVAL ; + val = (unsigned long long ) mvpwm->clk_rate * state->duty_cycle;do_div (val,NSEC_PER_SEC );if (val >UINT_MAX )
drivers/gpio/gpio-vf610.c +6 -2
@@ -135,9 +135,13 @@ static int vf610_gpio_direction_output(struct gpio_chip *chip, unsigned gpio, {struct vf610_gpio_port *port =gpiochip_get_data (chip);unsigned long mask =BIT (gpio); +u32 val; -if (port->sdata && port->sdata->have_paddr) -vf610_gpio_writel (mask, port->gpio_base +GPIO_PDDR ); +if (port->sdata && port->sdata->have_paddr) { + val =vf610_gpio_readl (port->gpio_base +GPIO_PDDR ); + val |= mask; +vf610_gpio_writel (val, port->gpio_base +GPIO_PDDR ); + }vf610_gpio_set (chip, gpio, value);
drivers/gpu/drm/drm_dp_mst_topology.c +1 -0
@@ -2987,6 +2987,7 @@ static void fetch_monitor_name(struct drm_dp_mst_topology_mgr *mgr, mst_edid =drm_dp_mst_get_edid (port->connector, mgr, port);drm_edid_get_monitor_name (mst_edid, name, namelen); +kfree (mst_edid); }/**
drivers/input/input.c +19 -0
@@ -50,6 +50,17 @@ static DEFINE_MUTEX(input_mutex);static const struct input_value input_value_sync = {EV_SYN ,SYN_REPORT ,1 }; +static const unsigned int input_max_code[EV_CNT ] = { + [EV_KEY ] =KEY_MAX , + [EV_REL ] =REL_MAX , + [EV_ABS ] =ABS_MAX , + [EV_MSC ] =MSC_MAX , + [EV_SW ] =SW_MAX , + [EV_LED ] =LED_MAX , + [EV_SND ] =SND_MAX , + [EV_FF ] =FF_MAX , +}; +static inline int is_event_supported (unsigned int code,unsigned long *bm,unsigned int max) {
@@ -1915,6 +1926,14 @@ EXPORT_SYMBOL(input_free_device);*/ void input_set_capability (struct input_dev *dev,unsigned int type,unsigned int code) { +if (type <EV_CNT && input_max_code[type] && + code > input_max_code[type]) { +pr_err ("%s: invalid code %u for type %u\n" , __func__, code, + type); +dump_stack (); +return ; + } +switch (type) {case EV_KEY :__set_bit (code, dev->keybit);
drivers/input/touchscreen/stmfts.c +5 -3
@@ -339,11 +339,11 @@ static int stmfts_input_open(struct input_dev *dev) err =pm_runtime_get_sync (&sdata->client->dev);if (err <0 ) -return err; + goto out; err =i2c_smbus_write_byte (sdata->client,STMFTS_MS_MT_SENSE_ON );if (err) -return err; + goto out;mutex_lock (&sdata->mutex); sdata->running = true;
@@ -366,7 +366,9 @@ static int stmfts_input_open(struct input_dev *dev) "failed to enable touchkey\n"); } -return 0 ; +out: +pm_runtime_put_noidle (&sdata->client->dev); +return err; }static void stmfts_input_close (struct input_dev *dev)
drivers/mmc/core/block.c +4 -4
@@ -1133,7 +1133,7 @@ static void mmc_blk_issue_discard_rq(struct mmc_queue *mq, struct request *req) arg ==MMC_TRIM_ARG ?INAND_CMD38_ARG_TRIM :INAND_CMD38_ARG_ERASE , - 0); + card->ext_csd.generic_cmd6_time); }if (!err) err =mmc_erase (card, from, nr, arg);
@@ -1175,7 +1175,7 @@ static void mmc_blk_issue_secdiscard_rq(struct mmc_queue *mq, arg ==MMC_SECURE_TRIM1_ARG ?INAND_CMD38_ARG_SECTRIM1 :INAND_CMD38_ARG_SECERASE , - 0); + card->ext_csd.generic_cmd6_time);if (err) goto out_retry; }
@@ -1193,7 +1193,7 @@ static void mmc_blk_issue_secdiscard_rq(struct mmc_queue *mq, err =mmc_switch (card,EXT_CSD_CMD_SET_NORMAL ,INAND_CMD38_ARG_EXT_CSD ,INAND_CMD38_ARG_SECTRIM2 , -0 ); + card->ext_csd.generic_cmd6_time);if (err) goto out_retry; }
@@ -1944,7 +1944,7 @@ static void mmc_blk_urgent_bkops(struct mmc_queue *mq, struct mmc_queue_req *mqrq) {if (mmc_blk_urgent_bkops_needed (mq, mqrq)) -mmc_start_bkops (mq->card, true); +mmc_run_bkops (mq->card); }void mmc_blk_mq_complete (struct request *req)
drivers/mmc/core/card.h +1 -5
@@ -23,15 +23,13 @@#define MMC_STATE_BLOCKADDR (1<<2)/* card uses block-addressing */ #define MMC_CARD_SDXC (1<<3)/* card is SDXC */ #define MMC_CARD_REMOVED (1<<4)/* card has been removed */ -#define MMC_STATE_DOING_BKOPS (1<<5)/* card is doing BKOPS */ -#define MMC_STATE_SUSPENDED (1<<6)/* card is suspended */ +#define MMC_STATE_SUSPENDED (1<<5)/* card is suspended */ #define mmc_card_present (c) ((c)->state & MMC_STATE_PRESENT)#define mmc_card_readonly (c) ((c)->state & MMC_STATE_READONLY)#define mmc_card_blockaddr (c) ((c)->state & MMC_STATE_BLOCKADDR)#define mmc_card_ext_capacity (c) ((c)->state & MMC_CARD_SDXC)#define mmc_card_removed (c) ((c) && ((c)->state & MMC_CARD_REMOVED)) -#define mmc_card_doing_bkops (c) ((c)->state & MMC_STATE_DOING_BKOPS)#define mmc_card_suspended (c) ((c)->state & MMC_STATE_SUSPENDED)#define mmc_card_set_present (c) ((c)->state |= MMC_STATE_PRESENT)
@@ -39,8 +37,6 @@#define mmc_card_set_blockaddr (c) ((c)->state |= MMC_STATE_BLOCKADDR)#define mmc_card_set_ext_capacity (c) ((c)->state |= MMC_CARD_SDXC)#define mmc_card_set_removed (c) ((c)->state |= MMC_CARD_REMOVED) -#define mmc_card_set_doing_bkops (c) ((c)->state |= MMC_STATE_DOING_BKOPS) -#define mmc_card_clr_doing_bkops (c) ((c)->state &= ~MMC_STATE_DOING_BKOPS)#define mmc_card_set_suspended (c) ((c)->state |= MMC_STATE_SUSPENDED)#define mmc_card_clr_suspended (c) ((c)->state &= ~MMC_STATE_SUSPENDED)
drivers/mmc/core/mmc.c +0 -6
@@ -2026,12 +2026,6 @@ static int _mmc_suspend(struct mmc_host *host, bool is_suspend)if (mmc_card_suspended (host->card)) goto out; -if (mmc_card_doing_bkops (host->card)) { - err =mmc_stop_bkops (host->card); -if (err) - goto out; - } - err =mmc_flush_cache (host->card);if (err) goto out;
drivers/mmc/core/mmc_ops.c +30 -80
177 lines not on this page · raw message
drivers/mmc/core/mmc_ops.h +1 -2
@@ -40,8 +40,7 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value, bool use_busy_signal, bool send_status, bool retry_crc_err);int mmc_switch (struct mmc_card *card,u8 set,u8 index,u8 value,unsigned int timeout_ms); -int mmc_stop_bkops (struct mmc_card *card); -void mmc_start_bkops (struct mmc_card *card,bool from_exception); +void mmc_run_bkops (struct mmc_card *card);int mmc_flush_cache (struct mmc_card *card);int mmc_cmdq_enable (struct mmc_card *card);int mmc_cmdq_disable (struct mmc_card *card);
drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_b0.c +7 -0
@@ -637,6 +637,13 @@ static int hw_atl_b0_hw_ring_tx_head_update(struct aq_hw_s *self, err = -ENXIO ; goto err_exit; } + +/* Validate that the new hw_head_ is reasonable. */ +if (hw_head_ >= ring->size) { + err = -ENXIO ; + goto err_exit; + } + ring->hw_head = hw_head_; err =aq_hw_err_from_flags (self);
drivers/net/ethernet/cadence/macb_main.c +1 -1
@@ -915,7 +915,6 @@ static void gem_rx_refill(struct macb_queue *queue)/* Make hw descriptor updates visible to CPU */ rmb (); - queue->rx_prepared_head++; desc =macb_rx_desc (queue, entry);if (!queue->rx_skbuff[entry]) {
@@ -954,6 +953,7 @@ static void gem_rx_refill(struct macb_queue *queue)dma_wmb (); desc->addr &= ~MACB_BIT (RX_USED ); } + queue->rx_prepared_head++; }/* Make descriptor updates visible to hardware */
drivers/net/ethernet/dec/tulip/tulip_core.c +4 -1
@@ -1410,8 +1410,10 @@ static int tulip_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)/* alloc_etherdev ensures aligned and zeroed private structures */ dev =alloc_etherdev (sizeof (*tp)); -if (!dev) +if (!dev) { +pci_disable_device (pdev);return -ENOMEM ; + }SET_NETDEV_DEV (dev, &pdev->dev);if (pci_resource_len (pdev,0 ) < tulip_tbl[chip_idx].io_size) {
@@ -1788,6 +1790,7 @@ static int tulip_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) err_out_free_netdev:free_netdev (dev); +pci_disable_device (pdev);return -ENODEV ; }
drivers/net/ethernet/intel/igb/igb_main.c +2 -1
@@ -5346,7 +5346,8 @@ static void igb_watchdog_task(struct work_struct *work)break ; } -if (adapter->link_speed !=SPEED_1000 ) +if (adapter->link_speed !=SPEED_1000 || + !hw->phy.ops.read_reg) goto no_wait;/* wait for Remote receiver status OK */
drivers/net/ethernet/mellanox/mlx5/core/en_main.c +7 -0
@@ -3739,6 +3739,13 @@ static netdev_features_t mlx5e_fix_features(struct net_device *netdev,netdev_warn (netdev,"Disabling LRO, not supported in legacy RQ\n" ); } +if (params->xdp_prog) { +if (features &NETIF_F_LRO ) { +netdev_warn (netdev,"LRO is incompatible with XDP\n" ); + features &= ~NETIF_F_LRO ; + } + } +if (MLX5E_GET_PFLAG (params,MLX5E_PFLAG_RX_CQE_COMPRESS )) { features &= ~NETIF_F_RXHASH ;if (netdev->features &NETIF_F_RXHASH )
drivers/net/ethernet/qlogic/qla3xxx.c +2 -1
@@ -3630,7 +3630,8 @@ static void ql_reset_work(struct work_struct *work) qdev->mem_map_registers;unsigned long hw_flags; -if (test_bit ((QL_RESET_PER_SCSI |QL_RESET_START ), &qdev->flags)) { +if (test_bit (QL_RESET_PER_SCSI , &qdev->flags) || +test_bit (QL_RESET_START , &qdev->flags)) {clear_bit (QL_LINK_MASTER , &qdev->flags);/*
drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c +1 -3
@@ -261,7 +261,7 @@ static int stmmac_pci_probe(struct pci_dev *pdev,return -ENOMEM ;/* Enable pci device */ - ret =pci_enable_device (pdev); + ret =pcim_enable_device (pdev);if (ret) {dev_err (&pdev->dev,"%s: ERROR: failed to enable device\n" , __func__);
@@ -313,8 +313,6 @@ static void stmmac_pci_remove(struct pci_dev *pdev)pcim_iounmap_regions (pdev,BIT (i));break ; } - -pci_disable_device (pdev); }static int __maybe_unused stmmac_pci_suspend (struct device *dev)
drivers/net/vmxnet3/vmxnet3_drv.c +6 -0
@@ -595,6 +595,7 @@ vmxnet3_rq_alloc_rx_buf(struct vmxnet3_rx_queue *rq, u32 ring_idx,if (dma_mapping_error (&adapter->pdev->dev, rbi->dma_addr)) {dev_kfree_skb_any (rbi->skb); + rbi->skb =NULL ; rq->stats.rx_buf_alloc_failure++;break ; }
@@ -619,6 +620,7 @@ vmxnet3_rq_alloc_rx_buf(struct vmxnet3_rx_queue *rq, u32 ring_idx,if (dma_mapping_error (&adapter->pdev->dev, rbi->dma_addr)) {put_page (rbi->page); + rbi->page =NULL ; rq->stats.rx_buf_alloc_failure++;break ; }
@@ -1584,6 +1586,10 @@ vmxnet3_rq_cleanup(struct vmxnet3_rx_queue *rq,u32 i, ring_idx;struct Vmxnet3_RxDesc *rxd; +/* ring has already been cleaned up */ +if (!rq->rx_ring[0 ].base) +return ; +for (ring_idx =0 ; ring_idx <2 ; ring_idx++) {for (i =0 ; i < rq->rx_ring[ring_idx].size; i++) {#ifdef __BIG_ENDIAN_BITFIELD
drivers/pci/pci.c +10 -0
@@ -2517,6 +2517,16 @@ static const struct dmi_system_id bridge_d3_blacklist[] = {DMI_MATCH (DMI_BOARD_VENDOR ,"Gigabyte Technology Co., Ltd." ), DMI_MATCH(DMI_BOARD_NAME, "X299 DESIGNARE EX-CF"), }, +/* +* Downstream device is not accessible after putting a root port +* into D3cold and back into D0 on Elo i2. +*/ + .ident ="Elo i2" , + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Elo Touch Solutions" ), +DMI_MATCH (DMI_PRODUCT_NAME ,"Elo i2" ), + DMI_MATCH(DMI_PRODUCT_VERSION, "RevB"), + }, }, #endif { }
drivers/scsi/qla2xxx/qla_target.c +3 -0
@@ -3753,6 +3753,9 @@ int qlt_abort_cmd(struct qla_tgt_cmd *cmd)spin_lock_irqsave (&cmd->cmd_lock, flags);if (cmd->aborted) { +if (cmd->sg_mapped) +qlt_unmap_sg (vha, cmd); +spin_unlock_irqrestore (&cmd->cmd_lock, flags);/* * It's normal to see 2 calls in this path:
drivers/vhost/net.c +7 -8
@@ -1209,13 +1209,9 @@ static struct socket *get_raw_socket(int fd)return ERR_PTR (r); } -static struct ptr_ring *get_tap_ptr_ring (int fd) +static struct ptr_ring *get_tap_ptr_ring (struct file *file) {struct ptr_ring *ring; -struct file *file =fget (fd); - -if (!file) -return NULL ; ring =tun_get_tx_ring (file);if (!IS_ERR (ring)) goto out;
@@ -1224,7 +1220,6 @@ static struct ptr_ring *get_tap_ptr_ring(int fd) goto out; ring =NULL ; out: -fput (file);return ring; }
@@ -1311,8 +1306,12 @@ static long vhost_net_set_backend(struct vhost_net *n, unsigned index, int fd) r =vhost_net_enable_vq (n, vq);if (r) goto err_used; -if (index ==VHOST_NET_VQ_RX ) - nvq->rx_ring =get_tap_ptr_ring (fd); +if (index ==VHOST_NET_VQ_RX ) { +if (sock) + nvq->rx_ring =get_tap_ptr_ring (sock->file); +else + nvq->rx_ring =NULL ; + } oldubufs = nvq->ubufs; nvq->ubufs = ubufs;
fs/afs/inode.c +13 -1
@@ -468,10 +468,22 @@ int afs_getattr(const struct path *path, struct kstat *stat, {struct inode *inode =d_inode (path->dentry);struct afs_vnode *vnode =AFS_FS_I (inode); -int seq =0 ; +struct key *key; +int ret, seq =0 ;_enter ("{ ino=%lu v=%u }" , inode->i_ino, inode->i_generation); +if (!(query_flags &AT_STATX_DONT_SYNC ) && + !test_bit (AFS_VNODE_CB_PROMISED , &vnode->flags)) { + key =afs_request_key (vnode->volume->cell); +if (IS_ERR (key)) +return PTR_ERR (key); + ret =afs_validate (vnode, key); +key_put (key); +if (ret <0 ) +return ret; + } + do { read_seqbegin_or_lock(&vnode->cb_lock, &seq); generic_fillattr(inode, stat);
fs/nilfs2/btnode.c +20 -3
@@ -20,6 +20,23 @@#include "page.h" #include "btnode.h" + +/** +* nilfs_init_btnc_inode - initialize B-tree node cache inode +* @btnc_inode: inode to be initialized +* +* nilfs_init_btnc_inode() sets up an inode for B-tree node cache. +*/ +void nilfs_init_btnc_inode (struct inode *btnc_inode) +{ +struct nilfs_inode_info *ii =NILFS_I (btnc_inode); + + btnc_inode->i_mode =S_IFREG ; + ii->i_flags =0 ; +memset (&ii->i_bmap_data,0 ,sizeof (struct nilfs_bmap )); +mapping_set_gfp_mask (btnc_inode->i_mapping,GFP_NOFS ); +} +void nilfs_btnode_cache_clear (struct address_space *btnc) {invalidate_mapping_pages (btnc,0 ,-1 );
@@ -29,7 +46,7 @@ void nilfs_btnode_cache_clear(struct address_space *btnc)struct buffer_head *nilfs_btnode_create_block (struct address_space *btnc,__u64 blocknr) { -struct inode *inode =NILFS_BTNC_I (btnc); +struct inode *inode = btnc->host;struct buffer_head *bh; bh =nilfs_grab_buffer (inode, btnc, blocknr,BIT (BH_NILFS_Node));
@@ -57,7 +74,7 @@ int nilfs_btnode_submit_block(struct address_space *btnc, __u64 blocknr, struct buffer_head **pbh, sector_t *submit_ptr) { struct buffer_head *bh; -struct inode *inode =NILFS_BTNC_I (btnc); +struct inode *inode = btnc->host;struct page *page;int err;
@@ -157,7 +174,7 @@ int nilfs_btnode_prepare_change_key(struct address_space *btnc, struct nilfs_btnode_chkey_ctxt *ctxt) {struct buffer_head *obh, *nbh; -struct inode *inode =NILFS_BTNC_I (btnc); +struct inode *inode = btnc->host;__u64 oldkey = ctxt->oldkey, newkey = ctxt->newkey;int err;
fs/nilfs2/btnode.h +1 -0
@@ -30,6 +30,7 @@ struct nilfs_btnode_chkey_ctxt {struct buffer_head *newbh; }; +void nilfs_init_btnc_inode (struct inode *btnc_inode);void nilfs_btnode_cache_clear (struct address_space *);struct buffer_head *nilfs_btnode_create_block (struct address_space *btnc,__u64 blocknr);
fs/nilfs2/btree.c +19 -8
@@ -58,7 +58,8 @@ static void nilfs_btree_free_path(struct nilfs_btree_path *path)static int nilfs_btree_get_new_block (const struct nilfs_bmap *btree,__u64 ptr,struct buffer_head **bhp) { -struct address_space *btnc = &NILFS_BMAP_I (btree)->i_btnode_cache; +struct inode *btnc_inode =NILFS_BMAP_I (btree)->i_assoc_inode; +struct address_space *btnc = btnc_inode->i_mapping;struct buffer_head *bh; bh =nilfs_btnode_create_block (btnc, ptr);
@@ -470,7 +471,8 @@ static int __nilfs_btree_get_block(const struct nilfs_bmap *btree, __u64 ptr,struct buffer_head **bhp, const struct nilfs_btree_readahead_info *ra) { - struct address_space *btnc = &NILFS_BMAP_I(btree)->i_btnode_cache; + struct inode *btnc_inode = NILFS_BMAP_I(btree)->i_assoc_inode; +struct address_space *btnc = btnc_inode->i_mapping;struct buffer_head *bh, *ra_bh;sector_t submit_ptr =0 ;int ret;
@@ -1742,6 +1744,10 @@ nilfs_btree_prepare_convert_and_insert(struct nilfs_bmap *btree, __u64 key, dat =nilfs_bmap_get_dat (btree); } + ret =nilfs_attach_btree_node_cache (&NILFS_BMAP_I (btree)->vfs_inode); +if (ret <0 ) +return ret; + ret =nilfs_bmap_prepare_alloc_ptr (btree, dreq, dat);if (ret <0 )return ret;
@@ -1914,7 +1920,7 @@ static int nilfs_btree_prepare_update_v(struct nilfs_bmap *btree, path[level].bp_ctxt.newkey = path[level].bp_newreq.bpr_ptr; path[level].bp_ctxt.bh = path[level].bp_bh; ret =nilfs_btnode_prepare_change_key ( - &NILFS_BMAP_I (btree)->i_btnode_cache, +NILFS_BMAP_I (btree)->i_assoc_inode->i_mapping, &path[level].bp_ctxt);if (ret <0 ) { nilfs_dat_abort_update(dat,
@@ -1940,7 +1946,7 @@ static void nilfs_btree_commit_update_v(struct nilfs_bmap *btree,if (buffer_nilfs_node (path[level].bp_bh)) {nilfs_btnode_commit_change_key ( - &NILFS_BMAP_I (btree)->i_btnode_cache, +NILFS_BMAP_I (btree)->i_assoc_inode->i_mapping, &path[level].bp_ctxt); path[level].bp_bh = path[level].bp_ctxt.bh; }
@@ -1959,7 +1965,7 @@ static void nilfs_btree_abort_update_v(struct nilfs_bmap *btree, &path[level].bp_newreq.bpr_req);if (buffer_nilfs_node (path[level].bp_bh))nilfs_btnode_abort_change_key ( - &NILFS_BMAP_I (btree)->i_btnode_cache, +NILFS_BMAP_I (btree)->i_assoc_inode->i_mapping, &path[level].bp_ctxt); }
@@ -2135,7 +2141,8 @@ static void nilfs_btree_add_dirty_buffer(struct nilfs_bmap *btree,static void nilfs_btree_lookup_dirty_buffers (struct nilfs_bmap *btree,struct list_head *listp) { -struct address_space *btcache = &NILFS_BMAP_I (btree)->i_btnode_cache; +struct inode *btnc_inode =NILFS_BMAP_I (btree)->i_assoc_inode; +struct address_space *btcache = btnc_inode->i_mapping;struct list_head lists[NILFS_BTREE_LEVEL_MAX ];struct pagevec pvec;struct buffer_head *bh, *head;
@@ -2189,12 +2196,12 @@ static int nilfs_btree_assign_p(struct nilfs_bmap *btree, path[level].bp_ctxt.newkey = blocknr; path[level].bp_ctxt.bh = *bh; ret =nilfs_btnode_prepare_change_key ( - &NILFS_BMAP_I (btree)->i_btnode_cache, +NILFS_BMAP_I (btree)->i_assoc_inode->i_mapping, &path[level].bp_ctxt);if (ret <0 )return ret;nilfs_btnode_commit_change_key ( - &NILFS_BMAP_I (btree)->i_btnode_cache, +NILFS_BMAP_I (btree)->i_assoc_inode->i_mapping, &path[level].bp_ctxt); *bh = path[level].bp_ctxt.bh; }
@@ -2399,6 +2406,10 @@ int nilfs_btree_init(struct nilfs_bmap *bmap)if (nilfs_btree_root_broken (nilfs_btree_get_root (bmap), bmap->b_inode)) ret = -EIO ; +else + ret =nilfs_attach_btree_node_cache ( + &NILFS_BMAP_I (bmap)->vfs_inode); +return ret; }
fs/nilfs2/dat.c +3 -1
@@ -497,7 +497,9 @@ int nilfs_dat_read(struct super_block *sb, size_t entry_size, di =NILFS_DAT_I (dat);lockdep_set_class (&di->mi.mi_sem, &dat_lock_key);nilfs_palloc_setup_cache (dat, &di->palloc_cache); -nilfs_mdt_setup_shadow_map (dat, &di->shadow); + err =nilfs_mdt_setup_shadow_map (dat, &di->shadow); +if (err) + goto failed; err =nilfs_read_inode_common (dat, raw_inode);if (err)
fs/nilfs2/gcinode.c +4 -3
@@ -126,9 +126,10 @@ int nilfs_gccache_submit_read_data(struct inode *inode, sector_t blkoff,int nilfs_gccache_submit_read_node (struct inode *inode,sector_t pbn,__u64 vbn,struct buffer_head **out_bh) { +struct inode *btnc_inode =NILFS_I (inode)->i_assoc_inode;int ret; - ret =nilfs_btnode_submit_block (&NILFS_I (inode)->i_btnode_cache, + ret =nilfs_btnode_submit_block (btnc_inode->i_mapping, vbn ? : pbn, pbn,REQ_OP_READ ,0 , out_bh, &pbn);if (ret == -EEXIST )/* internal code (cache hit) */
@@ -170,7 +171,7 @@ int nilfs_init_gcinode(struct inode *inode) ii->i_flags =0 ;nilfs_bmap_init_gc (ii->i_bmap); -return 0 ; +return nilfs_attach_btree_node_cache (inode); }/**
@@ -185,7 +186,7 @@ void nilfs_remove_all_gcinodes(struct the_nilfs *nilfs) ii = list_first_entry(head, struct nilfs_inode_info, i_dirty);list_del_init (&ii->i_dirty);truncate_inode_pages (&ii->vfs_inode.i_data,0 ); -nilfs_btnode_cache_clear (&ii->i_btnode_cache); +nilfs_btnode_cache_clear (ii->i_assoc_inode->i_mapping);iput (&ii->vfs_inode); } }
fs/nilfs2/inode.c +145 -14
219 lines not on this page · raw message
fs/nilfs2/mdt.c +29 -14
98 lines not on this page · raw message
fs/nilfs2/mdt.h +2 -4
@@ -18,14 +18,12 @@/** * struct nilfs_shadow_map - shadow mapping of meta data file * @bmap_store: shadow copy of bmap state -* @frozen_data: shadowed dirty data pages -* @frozen_btnodes: shadowed dirty b-tree nodes' pages +* @inode: holder of page caches used in shadow mapping * @frozen_buffers: list of frozen buffers */ struct nilfs_shadow_map {struct nilfs_bmap_store bmap_store; -struct address_space frozen_data; -struct address_space frozen_btnodes; +struct inode *inode;struct list_head frozen_buffers; };
fs/nilfs2/nilfs.h +7 -9
@@ -28,7 +28,7 @@* @i_xattr: <TODO> * @i_dir_start_lookup: page index of last successful search * @i_cno: checkpoint number for GC inode -* @i_btnode_cache: cached pages of b-tree nodes +* @i_assoc_inode: associated inode (B-tree node cache holder or back pointer) * @i_dirty: list for connecting dirty files * @xattr_sem: semaphore for extended attributes processing * @i_bh: buffer contains disk inode
@@ -43,7 +43,7 @@ struct nilfs_inode_info {__u64 i_xattr;/* sector_t ??? */ __u32 i_dir_start_lookup;__u64 i_cno;/* check point number for GC inode */ -struct address_space i_btnode_cache; +struct inode *i_assoc_inode;struct list_head i_dirty;/* List for connecting dirty files */ #ifdef CONFIG_NILFS_XATTR
@@ -75,13 +75,6 @@ NILFS_BMAP_I(const struct nilfs_bmap *bmap) return container_of(bmap, struct nilfs_inode_info, i_bmap_data); } -static inline struct inode *NILFS_BTNC_I (struct address_space *btnc) -{ -struct nilfs_inode_info *ii = - container_of(btnc, struct nilfs_inode_info, i_btnode_cache); -return &ii->vfs_inode; -} -/* * Dynamic state flags of NILFS on-memory inode (i_state) */
@@ -98,6 +91,8 @@ enum {NILFS_I_INODE_SYNC ,/* dsync is not allowed for inode */ NILFS_I_BMAP ,/* has bmap and btnode_cache */ NILFS_I_GCINODE ,/* inode for GC, on memory only */ +NILFS_I_BTNC ,/* inode for btree node cache */ + NILFS_I_SHADOW, /* inode for shadowed page cache */ };/*
@@ -265,6 +260,9 @@ struct inode *nilfs_iget(struct super_block *sb, struct nilfs_root *root, unsigned long ino);extern struct inode *nilfs_iget_for_gc (struct super_block *sb,unsigned long ino,__u64 cno); +int nilfs_attach_btree_node_cache (struct inode *inode); +void nilfs_detach_btree_node_cache (struct inode *inode); +struct inode *nilfs_iget_for_shadow (struct inode *inode);extern void nilfs_update_inode (struct inode *,struct buffer_head *,int );extern void nilfs_truncate (struct inode *);extern void nilfs_evict_inode (struct inode *);
fs/nilfs2/page.c +3 -4
@@ -452,10 +452,9 @@ void nilfs_mapping_init(struct address_space *mapping, struct inode *inode)/* * NILFS2 needs clear_page_dirty() in the following two cases: * -* 1) For B-tree node pages and data pages of the dat/gcdat, NILFS2 clears -* page dirty flags when it copies back pages from the shadow cache -* (gcdat->{i_mapping,i_btnode_cache}) to its original cache -* (dat->{i_mapping,i_btnode_cache}). +* 1) For B-tree node pages and data pages of DAT file, NILFS2 clears dirty +* flag of pages when it copies back pages from shadow cache to the +* original cache. * * 2) Some B-tree operations like insertion or deletion may dispose buffers * in dirty state, and this needs to cancel the dirty state of their pages.
fs/nilfs2/segment.c +6 -3
@@ -738,15 +738,18 @@ static void nilfs_lookup_dirty_node_buffers(struct inode *inode, struct list_head *listp) {struct nilfs_inode_info *ii =NILFS_I (inode); -struct address_space *mapping = &ii->i_btnode_cache; +struct inode *btnc_inode = ii->i_assoc_inode;struct pagevec pvec;struct buffer_head *bh, *head;unsigned int i;pgoff_t index =0 ; +if (!btnc_inode) +return ; +pagevec_init (&pvec); -while (pagevec_lookup_tag (&pvec, mapping, &index, +while (pagevec_lookup_tag (&pvec, btnc_inode->i_mapping, &index,PAGECACHE_TAG_DIRTY )) {for (i =0 ; i <pagevec_count (&pvec); i++) { bh = head =page_buffers (pvec.pages[i]);
@@ -2410,7 +2413,7 @@ nilfs_remove_written_gcinodes(struct the_nilfs *nilfs, struct list_head *head)continue ;list_del_init (&ii->i_dirty);truncate_inode_pages (&ii->vfs_inode.i_data,0 ); -nilfs_btnode_cache_clear (&ii->i_btnode_cache); +nilfs_btnode_cache_clear (ii->i_assoc_inode->i_mapping);iput (&ii->vfs_inode); } }
fs/nilfs2/super.c +2 -3
@@ -151,7 +151,8 @@ struct inode *nilfs_alloc_inode(struct super_block *sb) ii->i_bh =NULL ; ii->i_state =0 ; ii->i_cno =0 ; -nilfs_mapping_init (&ii->i_btnode_cache, &ii->vfs_inode); + ii->i_assoc_inode =NULL ; + ii->i_bmap = &ii->i_bmap_data;return &ii->vfs_inode; }
@@ -1382,8 +1383,6 @@ static void nilfs_inode_init_once(void *obj)#ifdef CONFIG_NILFS_XATTR init_rwsem (&ii->xattr_sem);#endif -address_space_init_once (&ii->i_btnode_cache); - ii->i_bmap = &ii->i_bmap_data;inode_init_once (&ii->vfs_inode); }
kernel/dma/swiotlb.c +8 -4
@@ -587,10 +587,14 @@ phys_addr_t swiotlb_tbl_map_single(struct device *hwdev,*/ for (i =0 ; i < nslots; i++) io_tlb_orig_addr[index+i] = orig_addr + (i <<IO_TLB_SHIFT ); -if (!(attrs &DMA_ATTR_SKIP_CPU_SYNC ) && - (dir ==DMA_TO_DEVICE || dir ==DMA_BIDIRECTIONAL )) -swiotlb_bounce (orig_addr, tlb_addr, size,DMA_TO_DEVICE ); - +/* +* When dir == DMA_FROM_DEVICE we could omit the copy from the orig +* to the tlb buffer, if we knew for sure the device will +* overwirte the entire current content. But we don't. Thus +* unconditional bounce may prevent leaking swiotlb content (i.e. +* kernel memory) to user-space. +*/ +swiotlb_bounce (orig_addr, tlb_addr, size,DMA_TO_DEVICE );return tlb_addr; }
kernel/events/core.c +14 -0
@@ -10758,6 +10758,9 @@ SYSCALL_DEFINE5(perf_event_open,* Do not allow to attach to a group in a different task * or CPU context. If we're moving SW events, we'll fix * this up later, so allow that. +* +* Racy, not holding group_leader->ctx->mutex, see comment with +* perf_event_ctx_lock(). */ if (!move_group && group_leader->ctx != ctx) goto err_context;
@@ -10807,6 +10810,7 @@ SYSCALL_DEFINE5(perf_event_open, }else {perf_event_ctx_unlock (group_leader, gctx); move_group =0 ; + goto not_move_group; } }
@@ -10823,7 +10827,17 @@ SYSCALL_DEFINE5(perf_event_open, } }else {mutex_lock (&ctx->mutex); + +/* +* Now that we hold ctx->lock, (re)validate group_leader->ctx == ctx, +* see the group_leader && !move_group test earlier. +*/ +if (group_leader && group_leader->ctx != ctx) { + err = -EINVAL ; + goto err_locked; + } } +not_move_group:if (ctx->task ==TASK_TOMBSTONE ) { err = -ESRCH ;
net/bridge/br_input.c +7 -0
@@ -47,6 +47,13 @@ static int br_pass_frame_up(struct sk_buff *skb)u64_stats_update_end (&brstats->syncp); vg =br_vlan_group_rcu (br); + +/* Reset the offload_fwd_mark because there could be a stacked +* bridge above, and it should not think this bridge it doing +* that bridge's work forwarding out its ports. +*/ +br_switchdev_frame_unmark (skb); +/* Bridge is just like any other port. Make sure the * packet is allowed except in promisc modue when someone * may be running packet capture.
net/key/af_key.c +4 -2
@@ -2836,8 +2836,10 @@ static int pfkey_process(struct sock *sk, struct sk_buff *skb, const struct sadbvoid *ext_hdrs[SADB_EXT_MAX ];int err; -pfkey_broadcast (skb_clone (skb,GFP_KERNEL ),GFP_KERNEL , -BROADCAST_PROMISC_ONLY ,NULL ,sock_net (sk)); + err =pfkey_broadcast (skb_clone (skb,GFP_KERNEL ),GFP_KERNEL , +BROADCAST_PROMISC_ONLY ,NULL ,sock_net (sk)); +if (err) +return err;memset (ext_hdrs,0 ,sizeof (ext_hdrs)); err =parse_exthdrs (skb, hdr, ext_hdrs);
net/mac80211/rx.c +1 -2
@@ -1322,8 +1322,7 @@ static void ieee80211_rx_reorder_ampdu(struct ieee80211_rx_data *rx, goto dont_reorder;/* not part of a BA session */ -if (ack_policy !=IEEE80211_QOS_CTL_ACK_POLICY_BLOCKACK && - ack_policy !=IEEE80211_QOS_CTL_ACK_POLICY_NORMAL ) +if (ack_policy ==IEEE80211_QOS_CTL_ACK_POLICY_NOACK ) goto dont_reorder;/* new, potentially un-ordered, ampdu frame - process it */
net/nfc/nci/data.c +1 -1
@@ -130,7 +130,7 @@ static int nci_queue_tx_data_frags(struct nci_dev *ndev, skb_frag =nci_skb_alloc (ndev, (NCI_DATA_HDR_SIZE + frag_len), -GFP_KERNEL ); +GFP_ATOMIC );if (skb_frag ==NULL ) { rc = -ENOMEM ; goto free_exit;
net/nfc/nci/hci.c +2 -2
@@ -165,7 +165,7 @@ static int nci_hci_send_data(struct nci_dev *ndev, u8 pipe, i =0 ; skb =nci_skb_alloc (ndev, conn_info->max_pkt_payload_len + -NCI_DATA_HDR_SIZE ,GFP_KERNEL ); +NCI_DATA_HDR_SIZE ,GFP_ATOMIC );if (!skb)return -ENOMEM ;
@@ -198,7 +198,7 @@ static int nci_hci_send_data(struct nci_dev *ndev, u8 pipe,if (i < data_len) { skb =nci_skb_alloc (ndev, conn_info->max_pkt_payload_len + -NCI_DATA_HDR_SIZE ,GFP_KERNEL ); +NCI_DATA_HDR_SIZE ,GFP_ATOMIC );if (!skb)return -ENOMEM ;
net/sched/act_pedit.c +4 -0
@@ -225,6 +225,10 @@ static int tcf_pedit_init(struct net *net, struct nlattr *nla,for (i =0 ; i < p->tcfp_nkeys; ++i) {u32 cur = p->tcfp_keys[i].off; +/* sanitize the shift value for any later use */ + p->tcfp_keys[i].shift =min_t (size_t,BITS_PER_TYPE (int) -1 , + p->tcfp_keys[i].shift); +/* The AT option can read a single byte, we can bound the actual * value with uchar max. */
sound/isa/wavefront/wavefront_synth.c +2 -1
@@ -1092,7 +1092,8 @@ wavefront_send_sample (snd_wavefront_t *dev,if (dataptr < data_end) { -__get_user (sample_short, dataptr); +if (get_user (sample_short, dataptr)) +return -EFAULT ; dataptr += skip;if (data_is_unsigned) {/* GUS ? */
tools/perf/bench/numa.c +1 -1
@@ -1631,7 +1631,7 @@ static int __bench_numa(const char *name) "GB/sec,", "total-speed", "GB/sec total speed");if (g->p.show_details >=2 ) { -char tname[14 +2 *10 +1 ]; +char tname[14 +2 *11 +1 ];struct thread_data *td;for (p =0 ; p < g->p.nr_proc; p++) {for (t =0 ; t < g->p.nr_threads; t++) {