The below commit adds support for:
> ip link set dummy0 down
> ip link set dummy0 master bond0 up
but breaks the opposite:
> ip link set dummy0 up
> ip link set dummy0 master bond0 down
Let's add a workaround to have both commands working.
Cc: stable(a)vger.kernel.org
Fixes: a4abfa627c38 ("net: rtnetlink: Enslave device before bringing it up")
Signed-off-by: Nicolas Dichtel <nicolas.dichtel(a)6wind.com>
Acked-by: Phil Sutter <phil(a)nwl.cc>
Reviewed-by: David Ahern <dsahern(a)kernel.org>
---
net/core/rtnetlink.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index e8431c6c8490..dd79693c2d91 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -2905,6 +2905,14 @@ static int do_setlink(const struct sk_buff *skb,
call_netdevice_notifiers(NETDEV_CHANGEADDR, dev);
}
+ /* Backward compat: enable to set interface down before enslaving it */
+ if (!(ifm->ifi_flags & IFF_UP) && ifm->ifi_change & IFF_UP) {
+ err = dev_change_flags(dev, rtnl_dev_combine_flags(dev, ifm),
+ extack);
+ if (err < 0)
+ goto errout;
+ }
+
if (tb[IFLA_MASTER]) {
err = do_set_master(dev, nla_get_u32(tb[IFLA_MASTER]), extack);
if (err)
--
2.39.2
When the brcmf_fwvid_attach() fails the driver instance is not added
to the vendor list. Hence we should not try to delete it from that
list when the brcmf_fwvid_detach() function is called in cleanup path.
Cc: stable(a)vger.kernel.org # 6.2.x
Fixes: d6a5c562214f ("wifi: brcmfmac: add support for vendor-specific firmware api")
Signed-off-by: Arend van Spriel <arend.vanspriel(a)broadcom.com>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.c
index f633e2bbd891..b427782554b5 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwvid.c
@@ -186,9 +186,10 @@ void brcmf_fwvid_detach(struct brcmf_pub *drvr)
mutex_lock(&fwvid_list_lock);
- drvr->vops = NULL;
- list_del(&drvr->bus_if->list);
-
+ if (drvr->vops) {
+ drvr->vops = NULL;
+ list_del(&drvr->bus_if->list);
+ }
mutex_unlock(&fwvid_list_lock);
}
--
2.32.0
This is the start of the stable review cycle for the 4.14.335 release.
There are 21 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Sun, 07 Jan 2024 14:38:02 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.14.335-r…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.14.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.14.335-rc1
Sarthak Kukreti <sarthakkukreti(a)chromium.org>
block: Don't invalidate pagecache for invalid falloc modes
Mikulas Patocka <mpatocka(a)redhat.com>
dm-integrity: don't modify bio's immutable bio_vec in integrity_metadata()
Rouven Czerwinski <r.czerwinski(a)pengutronix.de>
net: rfkill: gpio: set GPIO direction
Fedor Pchelkin <pchelkin(a)ispras.ru>
net: 9p: avoid freeing uninit memory in p9pdu_vreadf
Luiz Augusto von Dentz <luiz.von.dentz(a)intel.com>
Bluetooth: hci_event: Fix not checking if HCI_OP_INQUIRY has been sent
Reinhard Speyerer <rspmn(a)arcor.de>
USB: serial: option: add Quectel RM500Q R13 firmware support
Slark Xiao <slark_xiao(a)163.com>
USB: serial: option: add Foxconn T99W265 with new baseline
Alper Ak <alperyasinak1(a)gmail.com>
USB: serial: option: add Quectel EG912Y module support
Mark Glover <mark.glover(a)actisense.com>
USB: serial: ftdi_sio: update Actisense PIDs constant names
Johannes Berg <johannes.berg(a)intel.com>
wifi: cfg80211: fix certs build to not depend on file order
Chen-Yu Tsai <wens(a)kernel.org>
wifi: cfg80211: Add my certificate
Javier Carrasco <javier.carrasco.cruz(a)gmail.com>
iio: common: ms_sensors: ms_sensors_i2c: fix humidity conversion time table
Haoran Liu <liuhaoran14(a)163.com>
Input: ipaq-micro-keys - add error handling for devm_kmemdup
Su Hui <suhui(a)nfschina.com>
iio: imu: inv_mpu6050: fix an error code problem in inv_mpu6050_read_raw
Alexis Lothoré <alexis.lothore(a)bootlin.com>
pinctrl: at91-pio4: use dedicated lock class for IRQ
Liu Jian <liujian56(a)huawei.com>
net: check vlan filter feature in vlan_vids_add_by_dev() and vlan_vids_del_by_dev()
Zhipeng Lu <alexious(a)zju.edu.cn>
ethernet: atheros: fix a memleak in atl1e_setup_ring_resources
Eric Dumazet <edumazet(a)google.com>
net: sched: ife: fix potential use-after-free
Johannes Berg <johannes.berg(a)intel.com>
wifi: mac80211: mesh_plink: fix matches_local logic
Heiko Carstens <hca(a)linux.ibm.com>
s390/vx: fix save/restore of fpu kernel context
Kunwu Chan <chentao(a)kylinos.cn>
ARM: OMAP2+: Fix null pointer dereference and memory leak in omap_soc_device_init
-------------
Diffstat:
Makefile | 4 +-
arch/arm/mach-omap2/id.c | 5 ++
arch/s390/include/asm/fpu/api.h | 2 +-
drivers/iio/common/ms_sensors/ms_sensors_i2c.c | 4 +-
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 4 +-
drivers/input/keyboard/ipaq-micro-keys.c | 3 +
drivers/md/dm-integrity.c | 11 ++--
drivers/net/ethernet/atheros/atl1e/atl1e_main.c | 5 +-
drivers/pinctrl/pinctrl-at91-pio4.c | 8 +++
drivers/usb/serial/ftdi_sio.c | 6 +-
drivers/usb/serial/ftdi_sio_ids.h | 6 +-
drivers/usb/serial/option.c | 5 ++
fs/block_dev.c | 9 ++-
net/8021q/vlan_core.c | 9 ++-
net/9p/protocol.c | 17 +++--
net/bluetooth/hci_event.c | 3 +-
net/ife/ife.c | 1 +
net/mac80211/mesh_plink.c | 10 +--
net/rfkill/rfkill-gpio.c | 8 +++
net/wireless/certs/wens.hex | 87 +++++++++++++++++++++++++
20 files changed, 175 insertions(+), 32 deletions(-)
This is the start of the stable review cycle for the 5.4.266 release.
There are 47 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Sun, 07 Jan 2024 14:38:02 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.4.266-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 5.4.266-rc1
Sarthak Kukreti <sarthakkukreti(a)chromium.org>
block: Don't invalidate pagecache for invalid falloc modes
Steven Rostedt (Google) <rostedt(a)goodmis.org>
ring-buffer: Fix wake ups when buffer_percent is set to 100
Tony Lindgren <tony(a)atomide.com>
bus: ti-sysc: Flush posted write only after srst_udelay
Julien Panis <jpanis(a)baylibre.com>
bus: ti-sysc: Use fsleep() instead of usleep_range() in sysc_reset()
Paulo Alcantara <pc(a)manguebit.com>
smb: client: fix OOB in smbCalcSize()
Dan Carpenter <dan.carpenter(a)linaro.org>
usb: fotg210-hcd: delete an incorrect bounds test
Thomas Gleixner <tglx(a)linutronix.de>
x86/alternatives: Sync core before enabling interrupts
Rouven Czerwinski <r.czerwinski(a)pengutronix.de>
net: rfkill: gpio: set GPIO direction
Fedor Pchelkin <pchelkin(a)ispras.ru>
net: 9p: avoid freeing uninit memory in p9pdu_vreadf
Luiz Augusto von Dentz <luiz.von.dentz(a)intel.com>
Bluetooth: hci_event: Fix not checking if HCI_OP_INQUIRY has been sent
Reinhard Speyerer <rspmn(a)arcor.de>
USB: serial: option: add Quectel RM500Q R13 firmware support
Slark Xiao <slark_xiao(a)163.com>
USB: serial: option: add Foxconn T99W265 with new baseline
Alper Ak <alperyasinak1(a)gmail.com>
USB: serial: option: add Quectel EG912Y module support
Mark Glover <mark.glover(a)actisense.com>
USB: serial: ftdi_sio: update Actisense PIDs constant names
Johannes Berg <johannes.berg(a)intel.com>
wifi: cfg80211: fix certs build to not depend on file order
Chen-Yu Tsai <wens(a)kernel.org>
wifi: cfg80211: Add my certificate
Wadim Egorov <w.egorov(a)phytec.de>
iio: adc: ti_am335x_adc: Fix return value check of tiadc_request_dma()
Javier Carrasco <javier.carrasco.cruz(a)gmail.com>
iio: common: ms_sensors: ms_sensors_i2c: fix humidity conversion time table
Wei Yongjun <weiyongjun1(a)huawei.com>
scsi: bnx2fc: Fix skb double free in bnx2fc_rcv()
Haoran Liu <liuhaoran14(a)163.com>
Input: ipaq-micro-keys - add error handling for devm_kmemdup
Su Hui <suhui(a)nfschina.com>
iio: imu: inv_mpu6050: fix an error code problem in inv_mpu6050_read_raw
Mike Tipton <quic_mdtipton(a)quicinc.com>
interconnect: Treat xlate() returning NULL node as an error
Josef Bacik <josef(a)toxicpanda.com>
btrfs: do not allow non subvolume root targets for snapshot
Paulo Alcantara <pc(a)manguebit.com>
smb: client: fix NULL deref in asn1_ber_decoder()
Kai Vehmanen <kai.vehmanen(a)linux.intel.com>
ALSA: hda/hdmi: add force-connect quirk for NUC5CPYB
Kai Vehmanen <kai.vehmanen(a)linux.intel.com>
ALSA: hda/hdmi: Add quirk to force pin connectivity on NUC10
Alexis Lothoré <alexis.lothore(a)bootlin.com>
pinctrl: at91-pio4: use dedicated lock class for IRQ
Quan Nguyen <quan(a)os.amperecomputing.com>
i2c: aspeed: Handle the coalesced stop conditions with the start conditions.
David Howells <dhowells(a)redhat.com>
afs: Fix overwriting of result of DNS query
Eric Dumazet <edumazet(a)google.com>
net: check dev->gso_max_size in gso_features_check()
Heiner Kallweit <hkallweit1(a)gmail.com>
net: warn if gso_type isn't set for a GSO SKB
David Howells <dhowells(a)redhat.com>
afs: Fix dynamic root lookup DNS check
David Howells <dhowells(a)redhat.com>
afs: Fix the dynamic root's d_delete to always delete unused dentries
Liu Jian <liujian56(a)huawei.com>
net: check vlan filter feature in vlan_vids_add_by_dev() and vlan_vids_del_by_dev()
Eric Dumazet <edumazet(a)google.com>
net/rose: fix races in rose_kill_by_device()
Zhipeng Lu <alexious(a)zju.edu.cn>
ethernet: atheros: fix a memleak in atl1e_setup_ring_resources
Eric Dumazet <edumazet(a)google.com>
net: sched: ife: fix potential use-after-free
Rahul Rameshbabu <rrameshbabu(a)nvidia.com>
net/mlx5e: Correct snprintf truncation handling for fw_version buffer used by representors
Moshe Shemesh <moshe(a)nvidia.com>
net/mlx5: Fix fw tracer first block check
Hu Haowen <xianfengting221(a)163.com>
net/mlx5: improve some comments
Vlad Buslov <vladbu(a)nvidia.com>
Revert "net/mlx5e: fix double free of encap_header"
Johannes Berg <johannes.berg(a)intel.com>
wifi: mac80211: mesh_plink: fix matches_local logic
Heiko Carstens <hca(a)linux.ibm.com>
s390/vx: fix save/restore of fpu kernel context
Geert Uytterhoeven <geert+renesas(a)glider.be>
reset: Fix crash when freeing non-existent optional resets
Kunwu Chan <chentao(a)kylinos.cn>
ARM: OMAP2+: Fix null pointer dereference and memory leak in omap_soc_device_init
Namjae Jeon <linkinjeon(a)kernel.org>
ksmbd: fix wrong name of SMB2_CREATE_ALLOCATION_SIZE
Bin Li <bin.li(a)canonical.com>
ALSA: hda/realtek: Enable headset on Lenovo M90 Gen5
-------------
Diffstat:
Makefile | 4 +-
arch/arm/mach-omap2/id.c | 5 ++
arch/s390/include/asm/fpu/api.h | 2 +-
arch/x86/kernel/alternative.c | 2 +-
drivers/bus/ti-sysc.c | 19 +++--
drivers/i2c/busses/i2c-aspeed.c | 48 ++++++++----
drivers/iio/adc/ti_am335x_adc.c | 4 +-
drivers/iio/common/ms_sensors/ms_sensors_i2c.c | 4 +-
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c | 4 +-
drivers/input/keyboard/ipaq-micro-keys.c | 3 +
drivers/interconnect/core.c | 3 +
drivers/net/ethernet/atheros/atl1e/atl1e_main.c | 5 +-
.../ethernet/mellanox/mlx5/core/diag/fw_tracer.c | 4 +-
.../net/ethernet/mellanox/mlx5/core/en/tc_tun.c | 10 ++-
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 +-
drivers/pinctrl/pinctrl-at91-pio4.c | 8 ++
drivers/reset/core.c | 3 +
drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 9 +--
drivers/usb/host/fotg210-hcd.c | 3 -
drivers/usb/serial/ftdi_sio.c | 6 +-
drivers/usb/serial/ftdi_sio_ids.h | 6 +-
drivers/usb/serial/option.c | 5 ++
fs/afs/cell.c | 6 +-
fs/afs/dynroot.c | 31 ++++----
fs/block_dev.c | 9 ++-
fs/btrfs/ioctl.c | 9 +++
fs/cifs/misc.c | 4 +
fs/cifs/smb2misc.c | 26 +++----
fs/cifs/smb2pdu.h | 2 +-
kernel/trace/ring_buffer.c | 9 ++-
net/8021q/vlan_core.c | 9 ++-
net/9p/protocol.c | 17 ++++-
net/bluetooth/hci_event.c | 3 +-
net/core/dev.c | 8 ++
net/ife/ife.c | 1 +
net/mac80211/mesh_plink.c | 10 +--
net/rfkill/rfkill-gpio.c | 8 ++
net/rose/af_rose.c | 41 ++++++++--
net/wireless/certs/wens.hex | 87 ++++++++++++++++++++++
sound/pci/hda/patch_hdmi.c | 2 +
sound/pci/hda/patch_realtek.c | 1 +
41 files changed, 335 insertions(+), 107 deletions(-)
I'm announcing the release of the 6.1.71 kernel.
All users of the 6.1 kernel series must upgrade.
The updated 6.1.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.1.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/boot/dts/am33xx.dtsi | 1
drivers/base/property.c | 11
drivers/iio/imu/adis16475.c | 117 ++--
drivers/spi/spi-atmel.c | 82 ++-
drivers/spi/spi.c | 92 ++-
drivers/usb/host/fotg210-hcd.c | 3
fs/namei.c | 125 +++-
fs/nfsd/nfsctl.c | 9
fs/nfsd/nfsd.h | 8
fs/nfsd/nfssvc.c | 57 --
fs/smb/common/smb2pdu.h | 1
fs/smb/server/Kconfig | 10
fs/smb/server/asn1.c | 27
fs/smb/server/auth.c | 11
fs/smb/server/connection.c | 74 --
fs/smb/server/connection.h | 2
fs/smb/server/ksmbd_netlink.h | 4
fs/smb/server/ksmbd_work.c | 100 +++
fs/smb/server/ksmbd_work.h | 36 -
fs/smb/server/mgmt/share_config.h | 29 -
fs/smb/server/mgmt/tree_connect.c | 53 +
fs/smb/server/mgmt/tree_connect.h | 14
fs/smb/server/mgmt/user_config.h | 1
fs/smb/server/mgmt/user_session.c | 38 -
fs/smb/server/mgmt/user_session.h | 3
fs/smb/server/oplock.c | 147 ++++-
fs/smb/server/oplock.h | 8
fs/smb/server/server.c | 36 -
fs/smb/server/smb2misc.c | 19
fs/smb/server/smb2ops.c | 19
fs/smb/server/smb2pdu.c | 1033 ++++++++++++++++----------------------
fs/smb/server/smb2pdu.h | 3
fs/smb/server/smb_common.c | 19
fs/smb/server/smb_common.h | 14
fs/smb/server/smbacl.c | 20
fs/smb/server/smbacl.h | 2
fs/smb/server/transport_ipc.c | 4
fs/smb/server/transport_rdma.c | 44 +
fs/smb/server/unicode.c | 193 ++++---
fs/smb/server/vfs.c | 608 +++++++++++-----------
fs/smb/server/vfs.h | 52 -
fs/smb/server/vfs_cache.c | 63 +-
fs/smb/server/vfs_cache.h | 18
include/linux/blkdev.h | 2
include/linux/export-internal.h | 1
include/linux/module.h | 9
include/linux/namei.h | 7
include/linux/property.h | 7
include/linux/spi/spi.h | 23
kernel/module/kallsyms.c | 2
kernel/trace/ring_buffer.c | 140 +----
kernel/trace/trace.c | 20
kernel/trace/trace_kprobe.c | 25
mm/filemap.c | 9
mm/memory-failure.c | 8
mm/migrate.c | 9
net/netfilter/nf_tables_api.c | 2
58 files changed, 1981 insertions(+), 1495 deletions(-)
Al Viro (1):
fs: introduce lock_rename_child() helper
Amit Kumar Mahapatra (1):
spi: Add APIs in spi core to set/get spi->chip_select and spi->cs_gpiod
Andrii Nakryiko (1):
tracing/kprobes: Fix symbol counting logic by looking at modules as well
Andy Shevchenko (2):
spi: Introduce spi_get_device_match_data() helper
device property: Allow const parameter to dev_fwnode()
Atte Heikkilä (1):
ksmbd: fix `force create mode' and `force directory mode'
Baokun Li (1):
mm/filemap: avoid buffered read/write race to read inconsistent data
Charan Teja Kalla (1):
mm: migrate high-order folios in swap cache correctly
Cheng-Han Wu (1):
ksmbd: Remove unused field in ksmbd_user struct
Christoph Hellwig (1):
block: renumber QUEUE_FLAG_HW_WC
Colin Ian King (1):
ksmbd: Fix spelling mistake "excceed" -> "exceeded"
Dan Carpenter (1):
usb: fotg210-hcd: delete an incorrect bounds test
David Disseldorp (3):
ksmbd: set NegotiateContextCount once instead of every inc
ksmbd: avoid duplicate negotiate ctx offset increments
ksmbd: remove unused compression negotiate ctx packing
Dawei Li (3):
ksmbd: Implements sess->rpc_handle_list as xarray
ksmbd: fix typo, syncronous->synchronous
ksmbd: Remove duplicated codes
Geert Uytterhoeven (1):
spi: Constify spi parameters of chip select APIs
Greg Kroah-Hartman (1):
Linux 6.1.71
Gustavo A. R. Silva (3):
ksmbd: replace one-element arrays with flexible-array members
ksmbd: Use struct_size() helper in ksmbd_negotiate_smb_dialect()
ksmbd: Replace one-element array with flexible-array member
Helge Deller (1):
linux/export: Ensure natural alignment of kcrctab array
Jeff Layton (1):
ksmbd: use F_SETLK when unlocking a file
Jiapeng Chong (1):
ksmbd: Fix parameter name and comment mismatch
Jiri Olsa (1):
kallsyms: Make module_kallsyms_on_each_symbol generally available
Kangjing Huang (1):
ksmbd: fix missing RDMA-capable flag for IPoIB device in ksmbd_rdma_capable_netdev()
Louis Chauvet (1):
spi: atmel: Fix clock issue when using devices with different polarities
Lu Hongfei (2):
ksmbd: Change the return value of ksmbd_vfs_query_maximal_access to void
ksmbd: Replace the ternary conditional operator with min()
Marios Makassikis (2):
ksmbd: Fix resource leak in smb2_lock()
ksmbd: fix recursive locking in vfs helpers
Matthew Wilcox (Oracle) (2):
mm/memory-failure: cast index to loff_t before shifting it
mm/memory-failure: check the mapcount of the precise page
Namjae Jeon (46):
ksmbd: set SMB2_SESSION_FLAG_ENCRYPT_DATA when enforcing data encryption for this share
ksmbd: delete asynchronous work from list
ksmbd: fix racy issue from using ->d_parent and ->d_name
ksmbd: fix uninitialized pointer read in ksmbd_vfs_rename()
ksmbd: fix uninitialized pointer read in smb2_create_link()
ksmbd: call putname after using the last component
ksmbd: fix posix_acls and acls dereferencing possible ERR_PTR()
ksmbd: add mnt_want_write to ksmbd vfs functions
ksmbd: remove unused ksmbd_tree_conn_share function
ksmbd: use kzalloc() instead of __GFP_ZERO
ksmbd: return a literal instead of 'err' in ksmbd_vfs_kern_path_locked()
ksmbd: use kvzalloc instead of kvmalloc
ksmbd: check if a mount point is crossed during path lookup
ksmbd: add support for read compound
ksmbd: fix wrong interim response on compound
ksmbd: add missing calling smb2_set_err_rsp() on error
ksmbd: remove unneeded mark_inode_dirty in set_info_sec()
ksmbd: fix passing freed memory 'aux_payload_buf'
ksmbd: return invalid parameter error response if smb2 request is invalid
ksmbd: check iov vector index in ksmbd_conn_write()
ksmbd: fix race condition with fp
ksmbd: fix race condition from parallel smb2 logoff requests
ksmbd: fix race condition from parallel smb2 lock requests
ksmbd: fix race condition between tree conn lookup and disconnect
ksmbd: fix wrong error response status by using set_smb2_rsp_status()
ksmbd: fix Null pointer dereferences in ksmbd_update_fstate()
ksmbd: fix potential double free on smb2_read_pipe() error path
ksmbd: reorganize ksmbd_iov_pin_rsp()
ksmbd: fix kernel-doc comment of ksmbd_vfs_setxattr()
ksmbd: add support for surrogate pair conversion
ksmbd: no need to wait for binded connection termination at logoff
ksmbd: fix kernel-doc comment of ksmbd_vfs_kern_path_locked()
ksmbd: fix possible deadlock in smb2_open
ksmbd: separately allocate ci per dentry
ksmbd: move oplock handling after unlock parent dir
ksmbd: release interim response after sending status pending response
ksmbd: move setting SMB2_FLAGS_ASYNC_COMMAND and AsyncId
ksmbd: don't update ->op_state as OPLOCK_STATE_NONE on error
ksmbd: set epoch in create context v2 lease
ksmbd: set v2 lease capability
ksmbd: downgrade RWH lease caching state to RH for directory
ksmbd: send v2 lease break notification for directory
ksmbd: lazy v2 lease break on smb2_write()
ksmbd: avoid duplicate opinfo_put() call on error of smb21_lease_break_ack()
ksmbd: fix wrong allocation size update in smb2_open()
ksmbd: fix slab-out-of-bounds in smb_strndup_from_utf16()
NeilBrown (3):
nfsd: separate nfsd_last_thread() from nfsd_put()
nfsd: call nfsd_last_thread() before final nfsd_put()
NFSD: fix possible oops when nfsd/pool_stats is closed.
Nuno Sa (1):
iio: imu: adis16475: add spi_device_id table
Pablo Neira Ayuso (1):
netfilter: nf_tables: skip set commit for deleted/destroyed sets
Shin'ichiro Kawasaki (2):
platform/x86: p2sb: Allow p2sb_bar() calls during PCI device probe
Revert "platform/x86: p2sb: Allow p2sb_bar() calls during PCI device probe"
Steve French (2):
ksmbd: update Kconfig to note Kerberos support and fix indentation
ksmbd: remove experimental warning
Steven Rostedt (Google) (4):
ring-buffer: Fix wake ups when buffer_percent is set to 100
tracing: Fix blocked reader of snapshot buffer
ring-buffer: Remove useless update to write_stamp in rb_try_to_discard()
ring-buffer: Fix slowpath of interrupted event
Tom Rix (1):
ksmbd: remove unused is_char_allowed function
Tony Lindgren (1):
ARM: dts: Fix occasional boot hang for am3 usb
Tudor Ambarus (1):
spi: Reintroduce spi_set_cs_timing()
Wang Ming (1):
ksmbd: Fix unsigned expression compared with zero
Yang Li (1):
ksmbd: Fix one kernel-doc comment
Yang Yingliang (1):
ksmbd: switch to use kmemdup_nul() helper
Zongmin Zhou (1):
ksmbd: prevent memory leak on error return
ye xingchen (1):
ksmbd: Convert to use sysfs_emit()/sysfs_emit_at() APIs
The patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable(a)vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-4.14.y
git checkout FETCH_HEAD
git cherry-pick -x 1364a3c391aedfeb32aa025303ead3d7c91cdf9d
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable(a)vger.kernel.org>' --in-reply-to '2023101517-patriarch-reuse-cc1c@gregkh' --subject-prefix 'PATCH 4.14.y' HEAD^..
Possible dependencies:
1364a3c391ae ("block: Don't invalidate pagecache for invalid falloc modes")
05bdb9965305 ("block: replace fmode_t with a block-specific type for block open flags")
5e4ea834676e ("block: remove unused fmode_t arguments from ioctl handlers")
cfb425761c79 ("block: move a few internal definitions out of blkdev.h")
99b07780814e ("rnbd-srv: replace sess->open_flags with a "bool readonly"")
658afed19cee ("mtd: block: use a simple bool to track open for write")
7d9d7d59d44b ("nvme: replace the fmode_t argument to the nvme ioctl handlers with a simple bool")
2e80089c1824 ("scsi: replace the fmode_t argument to scsi_ioctl with a simple bool")
5f4eb9d5413f ("scsi: replace the fmode_t argument to scsi_cmd_allowed with a simple bool")
81b1fb7d17c0 ("fs: remove sb->s_mode")
3f0b3e785e8b ("block: add a sb_open_mode helper")
2736e8eeb0cc ("block: use the holder as indication for exclusive opens")
2ef789288afd ("btrfs: don't pass a holder for non-exclusive blkdev_get_by_path")
29499ab060fe ("bcache: don't pass a stack address to blkdev_get_by_path")
c889d0793d9d ("swsusp: don't pass a stack address to blkdev_get_by_path")
ae220766d87c ("block: remove the unused mode argument to ->release")
d32e2bf83791 ("block: pass a gendisk to ->open")
444aa2c58cb3 ("block: pass a gendisk on bdev_check_media_change")
7ae24fcee992 ("cdrom: remove the unused mode argument to cdrom_release")
473399b50de1 ("cdrom: remove the unused mode argument to cdrom_ioctl")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 1364a3c391aedfeb32aa025303ead3d7c91cdf9d Mon Sep 17 00:00:00 2001
From: Sarthak Kukreti <sarthakkukreti(a)chromium.org>
Date: Wed, 11 Oct 2023 13:12:30 -0700
Subject: [PATCH] block: Don't invalidate pagecache for invalid falloc modes
Only call truncate_bdev_range() if the fallocate mode is supported. This
fixes a bug where data in the pagecache could be invalidated if the
fallocate() was called on the block device with an invalid mode.
Fixes: 25f4c41415e5 ("block: implement (some of) fallocate for block devices")
Cc: stable(a)vger.kernel.org
Reported-by: "Darrick J. Wong" <djwong(a)kernel.org>
Signed-off-by: Sarthak Kukreti <sarthakkukreti(a)chromium.org>
Reviewed-by: Christoph Hellwig <hch(a)lst.de>
Reviewed-by: "Darrick J. Wong" <djwong(a)kernel.org>
Signed-off-by: Mike Snitzer <snitzer(a)kernel.org>
Fixes: line? I've never seen those wrapped.
Link: https://lore.kernel.org/r/20231011201230.750105-1-sarthakkukreti@chromium.o…
Signed-off-by: Jens Axboe <axboe(a)kernel.dk>
diff --git a/block/fops.c b/block/fops.c
index acff3d5d22d4..73e42742543f 100644
--- a/block/fops.c
+++ b/block/fops.c
@@ -772,24 +772,35 @@ static long blkdev_fallocate(struct file *file, int mode, loff_t start,
filemap_invalidate_lock(inode->i_mapping);
- /* Invalidate the page cache, including dirty pages. */
- error = truncate_bdev_range(bdev, file_to_blk_mode(file), start, end);
- if (error)
- goto fail;
-
+ /*
+ * Invalidate the page cache, including dirty pages, for valid
+ * de-allocate mode calls to fallocate().
+ */
switch (mode) {
case FALLOC_FL_ZERO_RANGE:
case FALLOC_FL_ZERO_RANGE | FALLOC_FL_KEEP_SIZE:
+ error = truncate_bdev_range(bdev, file_to_blk_mode(file), start, end);
+ if (error)
+ goto fail;
+
error = blkdev_issue_zeroout(bdev, start >> SECTOR_SHIFT,
len >> SECTOR_SHIFT, GFP_KERNEL,
BLKDEV_ZERO_NOUNMAP);
break;
case FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE:
+ error = truncate_bdev_range(bdev, file_to_blk_mode(file), start, end);
+ if (error)
+ goto fail;
+
error = blkdev_issue_zeroout(bdev, start >> SECTOR_SHIFT,
len >> SECTOR_SHIFT, GFP_KERNEL,
BLKDEV_ZERO_NOFALLBACK);
break;
case FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE | FALLOC_FL_NO_HIDE_STALE:
+ error = truncate_bdev_range(bdev, file_to_blk_mode(file), start, end);
+ if (error)
+ goto fail;
+
error = blkdev_issue_discard(bdev, start >> SECTOR_SHIFT,
len >> SECTOR_SHIFT, GFP_KERNEL);
break;