nvme-fc: go straight to connecting state when initializing
Subsystems (10)
Sasha Levin
maintainerPATCH 1/15 nvme-fc: go straight to connecting state when initializing
From: Daniel Wagner <[email protected]>
[ Upstream commit d3d380eded7ee5fc2fc53b3b0e72365ded025c4a ]
The initial controller initialization mimiks the reconnect loop behavior by switching from NEW to RESETTING and then to CONNECTING.
The transition from NEW to CONNECTING is a valid transition, so there is no point entering the RESETTING state. TCP and RDMA also transition directly to CONNECTING state.
--- drivers/nvme/host/fc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/nvme/host/fc.c +1 -2
@@ -3550,8 +3550,7 @@ nvme_fc_init_ctrl(struct device *dev, struct nvmf_ctrl_options *opts,list_add_tail (&ctrl->ctrl_list, &rport->ctrl_list);spin_unlock_irqrestore (&rport->lock, flags); -if (!nvme_change_ctrl_state (&ctrl->ctrl,NVME_CTRL_RESETTING ) || - !nvme_change_ctrl_state (&ctrl->ctrl,NVME_CTRL_CONNECTING )) { +if (!nvme_change_ctrl_state (&ctrl->ctrl,NVME_CTRL_CONNECTING )) {dev_err (ctrl->ctrl.device,"NVME-FC{%d}: failed to init ctrl state\n" , ctrl->cnum); goto fail_ctrl;
Signature · 1 line
2.39.5
Sasha Levin
maintainerPATCH 2/15 nvme-fc: do not ignore connectivity loss during connecting
From: Daniel Wagner <[email protected]>
[ Upstream commit ee59e3820ca92a9f4307ae23dfc7229dc8b8d400 ]
When a connectivity loss occurs while nvme_fc_create_assocation is being executed, it's possible that the ctrl ends up stuck in the LIVE state:
1) nvme nvme10: NVME-FC{10}: create association : ...
2) nvme nvme10: NVME-FC{10}: controller connectivity lost. Awaiting Reconnect
nvme nvme10: queue_size 128 > ctrl maxcmd 32, reducing to maxcmd
3) nvme nvme10: Could not set queue count (880)
nvme nvme10: Failed to configure AEN (cfg 900)
4) nvme nvme10: NVME-FC{10}: controller connect complete
5) nvme nvme10: failed nvme_keep_alive_end_io error=4
A connection attempt starts 1) and the ctrl is in state CONNECTING. Shortly after the LLDD driver detects a connection lost event and calls nvme_fc_ctrl_connectivity_loss 2). Because we are still in CONNECTING state, this event is ignored.
nvme_fc_create_association continues to run in parallel and tries to communicate with the controller and these commands will fail. Though these errors are filtered out, e.g in 3) setting the I/O queues numbers fails which leads to an early exit in nvme_fc_create_io_queues. Because the number of IO queues is 0 at this point, there is nothing left in nvme_fc_create_association which could detected the connection drop. Thus the ctrl enters LIVE state 4).
Eventually the keep alive handler times out 5) but because nothing is being done, the ctrl stays in LIVE state.
There is already the ASSOC_FAILED flag to track connectivity loss event but this bit is set too late in the recovery code path. Move this into the connectivity loss event handler and synchronize it with the state change. This ensures that the ASSOC_FAILED flag is seen by nvme_fc_create_io_queues and it does not enter the LIVE state after a connectivity loss event. If the connectivity loss event happens after we entered the LIVE state the normal error recovery path is executed.
--- drivers/nvme/host/fc.c | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-)
drivers/nvme/host/fc.c +18 -5
@@ -782,11 +782,19 @@ nvme_fc_abort_lsops(struct nvme_fc_rport *rport)static void nvme_fc_ctrl_connectivity_loss (struct nvme_fc_ctrl *ctrl) { +enum nvme_ctrl_state state; +unsigned long flags; +dev_info (ctrl->ctrl.device,"NVME-FC{%d}: controller connectivity lost. Awaiting " "Reconnect" , ctrl->cnum); -switch (nvme_ctrl_state (&ctrl->ctrl)) { +spin_lock_irqsave (&ctrl->lock, flags); +set_bit (ASSOC_FAILED , &ctrl->flags); + state =nvme_ctrl_state (&ctrl->ctrl); +spin_unlock_irqrestore (&ctrl->lock, flags); + +switch (state) {case NVME_CTRL_NEW :case NVME_CTRL_LIVE :/*
@@ -2543,7 +2551,6 @@ nvme_fc_error_recovery(struct nvme_fc_ctrl *ctrl, char *errmsg)*/ if (ctrl->ctrl.state ==NVME_CTRL_CONNECTING ) {__nvme_fc_abort_outstanding_ios (ctrl, true); -set_bit (ASSOC_FAILED , &ctrl->flags);dev_warn (ctrl->ctrl.device,"NVME-FC{%d}: transport error during (re)connect\n" , ctrl->cnum);
@@ -3165,12 +3172,18 @@ nvme_fc_create_association(struct nvme_fc_ctrl *ctrl)else ret =nvme_fc_recreate_io_queues (ctrl); } -if (!ret &&test_bit (ASSOC_FAILED , &ctrl->flags)) - ret = -EIO ;if (ret) goto out_term_aen_ops; - changed =nvme_change_ctrl_state (&ctrl->ctrl,NVME_CTRL_LIVE ); +spin_lock_irqsave (&ctrl->lock, flags); +if (!test_bit (ASSOC_FAILED , &ctrl->flags)) + changed =nvme_change_ctrl_state (&ctrl->ctrl,NVME_CTRL_LIVE ); +else + ret = -EIO ; +spin_unlock_irqrestore (&ctrl->lock, flags); + +if (ret) + goto out_term_aen_ops; ctrl->ctrl.nr_reconnects =0 ;
Signature · 1 line
2.39.5
Sasha Levin
maintainerPATCH 3/15 hrtimers: Mark is_migration_base() with __always_inline
In reply to Sasha LevinFrom: Andy Shevchenko <[email protected]>
[ Upstream commit 27af31e44949fa85550176520ef7086a0d00fd7b ]
When is_migration_base() is unused, it prevents kernel builds with clang, make W=1 and CONFIG_WERROR=y:
kernel/time/hrtimer.c:156:20: error: unused function 'is_migration_base' [-Werror,-Wunused-function]
156 | static inline bool is_migration_base(struct hrtimer_clock_base *base)
| ^~~~~~~~~~~~~~~~~
Fix this by marking it with __always_inline.
[ tglx: Use __always_inline instead of __maybe_unused and move it into the
usage sites conditional ]
--- kernel/time/hrtimer.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-)
kernel/time/hrtimer.c +12 -10
@@ -145,11 +145,6 @@ static struct hrtimer_cpu_base migration_cpu_base = {#define migration_base migration_cpu_base.clock_base[0] -static inline bool is_migration_base (struct hrtimer_clock_base *base) -{ -return base == &migration_base; -} -/* * We are using hashed locking: holding per_cpu(hrtimer_bases)[n].lock * means that all timers which are tied to this base via timer->base are
@@ -275,11 +270,6 @@ switch_hrtimer_base(struct hrtimer *timer, struct hrtimer_clock_base *base,#else /* CONFIG_SMP */ -static inline bool is_migration_base (struct hrtimer_clock_base *base) -{ -return false; -} -static inline struct hrtimer_clock_base *lock_hrtimer_base (const struct hrtimer *timer,unsigned long *flags) __acquires(&timer->base->cpu_base->lock)
@@ -1381,6 +1371,18 @@ static void hrtimer_sync_wait_running(struct hrtimer_cpu_base *cpu_base, } } +#ifdef CONFIG_SMP +static __always_inline bool is_migration_base(struct hrtimer_clock_base *base) +{ +return base == &migration_base; +} +#else +static __always_inline bool is_migration_base(struct hrtimer_clock_base *base) +{ +return false; +} +#endif +/* * This function is called on PREEMPT_RT kernels when the fast path * deletion of a timer failed because the timer callback function was
Signature · 1 line
2.39.5
Sasha Levin
maintainerPATCH 4/15 powercap: call put_device() on an error path in powercap_register_control_type()
In reply to Sasha LevinFrom: Joe Hattori <[email protected]>
[ Upstream commit 93c66fbc280747ea700bd6199633d661e3c819b3 ]
powercap_register_control_type() calls device_register(), but does not release the refcount of the device when it fails.
Call put_device() before returning an error to balance the refcount.
Since the kfree(control_type) will be done by powercap_release(), remove the lines in powercap_register_control_type() before returning the error.
This bug was found by an experimental verifier that I am developing.
--- drivers/powercap/powercap_sys.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/powercap/powercap_sys.c +1 -2
@@ -627,8 +627,7 @@ struct powercap_control_type *powercap_register_control_type(dev_set_name (&control_type->dev,"%s" , name); result =device_register (&control_type->dev);if (result) { -if (control_type->allocated) -kfree (control_type); +put_device (&control_type->dev);return ERR_PTR (result); }idr_init (&control_type->idr);
Signature · 1 line
2.39.5
Sasha Levin
maintainerPATCH 5/15 iscsi_ibft: Fix UBSAN shift-out-of-bounds warning in ibft_attr_show_nic()
In reply to Sasha LevinFrom: Chengen Du <[email protected]>
[ Upstream commit 07e0d99a2f701123ad3104c0f1a1e66bce74d6e5 ]
When performing an iSCSI boot using IPv6, iscsistart still reads the /sys/firmware/ibft/ethernetX/subnet-mask entry. Since the IPv6 prefix length is 64, this causes the shift exponent to become negative, triggering a UBSAN warning. As the concept of a subnet mask does not apply to IPv6, the value is set to ~0 to suppress the warning message.
--- drivers/firmware/iscsi_ibft.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/firmware/iscsi_ibft.c +4 -1
@@ -310,7 +310,10 @@ static ssize_t ibft_attr_show_nic(void *data, int type, char *buf) str +=sprintf_ipaddr (str, nic->ip_addr);break ;case ISCSI_BOOT_ETH_SUBNET_MASK : - val =cpu_to_be32 (~((1 << (32 -nic->subnet_mask_prefix))-1 )); +if (nic->subnet_mask_prefix >32 ) + val =cpu_to_be32 (~0 ); +else + val =cpu_to_be32 (~((1 << (32 -nic->subnet_mask_prefix))-1 )); str +=sprintf (str,"%pI4" , &val);break ;case ISCSI_BOOT_ETH_PREFIX_LEN :
Signature · 1 line
2.39.5
Sasha Levin
maintainerPATCH 6/15 sched/debug: Provide slice length for fair tasks
In reply to Sasha LevinFrom: Christian Loehle <[email protected]>
[ Upstream commit 9065ce69754dece78606c8bbb3821449272e56bf ]
Since commit:
857b158dc5e8 ("sched/eevdf: Use sched_attr::sched_runtime to set request/slice suggestion")
... we have the userspace per-task tunable slice length, which is a key parameter that is otherwise difficult to obtain, so provide it in /proc/$PID/sched.
[ mingo: Clarified the changelog. ]
--- kernel/sched/debug.c | 2 ++ 1 file changed, 2 insertions(+)
kernel/sched/debug.c +2 -0
@@ -1089,6 +1089,8 @@ void proc_sched_show_task(struct task_struct *p, struct pid_namespace *ns,if (task_has_dl_policy (p)) {P (dl.runtime);P (dl.deadline); + }else if (fair_policy (p->policy)) { +P (se.slice); }#undef PN_SCHEDSTAT#undef P_SCHEDSTAT
Signature · 1 line
2.39.5
Sasha Levin
maintainerPATCH 7/15 platform/x86/intel: pmc: fix ltr decode in pmc_core_ltr_show()
In reply to Sasha LevinFrom: Dmitry Kandybka <[email protected]>
[ Upstream commit 583ef25bb2a094813351a727ddec38b35a15b9f8 ]
In pmc_core_ltr_show(), promote 'val' to 'u64' to avoid possible integer overflow. Values (10 bit) are multiplied by the scale, the result of expression is in a range from 1 to 34,326,183,936 which is bigger then UINT32_MAX. Compile tested only.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
--- drivers/platform/x86/intel/pmc/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/platform/x86/intel/pmc/core.c +2 -2
@@ -620,8 +620,8 @@ static u32 convert_ltr_scale(u32 val)static int pmc_core_ltr_show (struct seq_file *s,void *unused) {struct pmc_dev *pmcdev = s->private; -u64 decoded_snoop_ltr, decoded_non_snoop_ltr; -u32 ltr_raw_data, scale, val; +u64 decoded_snoop_ltr, decoded_non_snoop_ltr, val; +u32 ltr_raw_data, scale;u16 snoop_ltr, nonsnoop_ltr;int i, index, ltr_index =0 ;
Signature · 1 line
2.39.5
Sasha Levin
maintainerPATCH 8/15 scsi: core: Use GFP_NOIO to avoid circular locking dependency
In reply to Sasha LevinFrom: Rik van Riel <[email protected]>
[ Upstream commit 5363ee9d110e139584c2d92a0b640bc210588506 ]
Filesystems can write to disk from page reclaim with __GFP_FS set. Marc found a case where scsi_realloc_sdev_budget_map() ends up in page reclaim with GFP_KERNEL, where it could try to take filesystem locks again, leading to a deadlock.
WARNING: possible circular locking dependency detected
6.13.0 #1 Not tainted
------------------------------------------------------
kswapd0/70 is trying to acquire lock:ffff8881025d5d78 (&q->q_usage_counter(io)){++++}-{0:0}, at: blk_mq_submit_bio+0x461/0x6e0
but task is already holding lock:ffffffff81ef5f40 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat+0x9f/0x760
The full lockdep splat can be found in Marc's report:
https://lkml.org/lkml/2025/1/24/1101
Avoid the potential deadlock by doing the allocation with GFP_NOIO, which prevents both filesystem and block layer recursion.
--- drivers/scsi/scsi_scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/scsi_scan.c +1 -1
@@ -245,7 +245,7 @@ static int scsi_realloc_sdev_budget_map(struct scsi_device *sdev, } ret =sbitmap_init_node (&sdev->budget_map,scsi_device_max_queue_depth (sdev), - new_shift,GFP_KERNEL , + new_shift,GFP_NOIO , sdev->request_queue->node, false, true);if (!ret)sbitmap_resize (&sdev->budget_map, depth);
Signature · 1 line
2.39.5
Sasha Levin
maintainerPATCH 9/15 scsi: ufs: core: Fix error return with query response
In reply to Sasha LevinFrom: Seunghui Lee <[email protected]>
[ Upstream commit 1a78a56ea65252bb089e0daace989167227f2d31 ]
There is currently no mechanism to return error from query responses. Return the error and print the corresponding error message with it.
--- drivers/ufs/core/ufshcd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/ufs/core/ufshcd.c +6 -1
@@ -3013,8 +3013,13 @@ ufshcd_dev_cmd_completion(struct ufs_hba *hba, struct ufshcd_lrb *lrbp)case UPIU_TRANSACTION_QUERY_RSP : {u8 response = lrbp->ucd_rsp_ptr->header.response; -if (response ==0 ) +if (response ==0 ) { err =ufshcd_copy_query_response (hba, lrbp); + }else { + err = -EINVAL ; +dev_err (hba->dev,"%s: unexpected response in Query RSP: %x\n" , + __func__, response); + }break ; }case UPIU_TRANSACTION_REJECT_UPIU :
Signature · 1 line
2.39.5
Sasha Levin
maintainerPATCH 10/15 scsi: qla1280: Fix kernel oops when debug level > 2
In reply to Sasha LevinFrom: Magnus Lindholm <[email protected]>
[ Upstream commit 5233e3235dec3065ccc632729675575dbe3c6b8a ]
A null dereference or oops exception will eventually occur when qla1280.c driver is compiled with DEBUG_QLA1280 enabled and ql_debug_level > 2. I think its clear from the code that the intention here is sg_dma_len(s) not length of sg_next(s) when printing the debug info.
--- drivers/scsi/qla1280.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/qla1280.c +1 -1
@@ -2866,7 +2866,7 @@ qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp)dprintk (3 ,"S/G Segment phys_addr=%x %x, len=0x%x\n" ,cpu_to_le32 (upper_32_bits (dma_handle)),cpu_to_le32 (lower_32_bits (dma_handle)), -cpu_to_le32 (sg_dma_len (sg_next (s)))); +cpu_to_le32 (sg_dma_len (s))); remseg--; } dprintk(5, "qla1280_64bit_start_scsi: Scatter/gather "
Signature · 1 line
2.39.5
Sasha Levin
maintainerPATCH 11/15 Revert "drm/amd/display: Use HW lock mgr for PSR1"
In reply to Sasha LevinFrom: Tom Chung <[email protected]>
[ Upstream commit f245b400a223a71d6d5f4c72a2cb9b573a7fc2b6 ]
This reverts commita2b5a9956269 ("drm/amd/display: Use HW lock mgr for PSR1")
Because it may cause system hang while connect with two edp panel.
--- drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dce/dmub_hw_lock_mgr.c +1 -2
@@ -63,8 +63,7 @@ void dmub_hw_lock_mgr_inbox0_cmd(struct dc_dmub_srv *dmub_srv,bool should_use_dmub_lock (struct dc_link *link) { -if (link->psr_settings.psr_version ==DC_PSR_VERSION_SU_1 || - link->psr_settings.psr_version ==DC_PSR_VERSION_1 ) +if (link->psr_settings.psr_version ==DC_PSR_VERSION_SU_1 )return true;return false; }
Signature · 1 line
2.39.5
Sasha Levin
maintainerPATCH 12/15 ACPI: resource: IRQ override for Eluktronics MECH-17
In reply to Sasha LevinFrom: Gannon Kolding <[email protected]>
[ Upstream commit 607ab6f85f4194b644ea95ac5fe660ef575db3b4 ]
The Eluktronics MECH-17 (GM7RG7N) needs IRQ overriding for the keyboard to work.
Adding a DMI_MATCH entry for this laptop model makes the internal keyboard function normally.
--- drivers/acpi/resource.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/acpi/resource.c +6 -0
@@ -549,6 +549,12 @@ static const struct dmi_system_id maingear_laptop[] = { DMI_MATCH(DMI_BOARD_NAME, "RP-15"), }, }, + { + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Eluktronics Inc." ), + DMI_MATCH(DMI_BOARD_NAME, "MECH-17"), + }, + }, {/* TongFang GM6XGxX/TUXEDO Stellaris 16 Gen5 AMD */ .matches = {
Signature · 1 line
2.39.5
Sasha Levin
maintainerPATCH 13/15 smb: client: fix noisy when tree connecting to DFS interlink targets
In reply to Sasha LevinFrom: Paulo Alcantara <[email protected]>
[ Upstream commit 773dc23ff81838b6f74d7fabba5a441cc6a93982 ]
When the client attempts to tree connect to a domain-based DFS namespace from a DFS interlink target, the server will return STATUS_BAD_NETWORK_NAME and the following will appear on dmesg:
CIFS: VFS: BAD_NETWORK_NAME: \\dom\dfs
Since a DFS share might contain several DFS interlinks and they expire after 10 minutes, the above message might end up being flooded on dmesg when mounting or accessing them.
Print this only once per share.
--- fs/smb/client/smb2pdu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/smb/client/smb2pdu.c +1 -1
@@ -2162,7 +2162,7 @@ SMB2_tcon(const unsigned int xid, struct cifs_ses *ses, const char *tree, tcon_error_exit:if (rsp && rsp->hdr.Status ==STATUS_BAD_NETWORK_NAME ) -cifs_tcon_dbg (VFS ,"BAD_NETWORK_NAME: %s\n" , tree); +cifs_dbg (VFS |ONCE ,"BAD_NETWORK_NAME: %s\n" , tree); goto tcon_exit; }
Signature · 1 line
2.39.5
Sasha Levin
maintainerPATCH 14/15 alpha/elf: Fix misc/setarch test of util-linux by removing 32bit support
In reply to Sasha LevinFrom: "Eric W. Biederman" <[email protected]>
[ Upstream commit b029628be267cba3c7684ec684749fe3e4372398 ]
Richard Henderson <[email protected]> writes[1]:
Quoted 11 lines
There was a Spec benchmark (I forget which) which was memory bound and ran twice as fast with 32-bit pointers.
I copied the idea from DEC to the ELF abi, but never did all the other work to allow the toolchain to take advantage.
Amusingly, a later Spec changed the benchmark data sets to not fit into a 32-bit address space, specifically because of this.
I expect one could delete the ELF bit and personality and no one would notice. Not even the 10 remaining Alpha users.
In [2] it was pointed out that parts of setarch weren't working properly on alpha because it has it's own SET_PERSONALITY implementation. In the discussion that followed Richard Henderson pointed out that the 32bit pointer support for alpha was never completed.
Fix this by removing alpha's 32bit pointer support.
As a bit of paranoia refuse to execute any alpha binaries that have the EF_ALPHA_32BIT flag set. Just in case someone somewhere has binaries that try to use alpha's 32bit pointer support.
--- arch/alpha/include/asm/elf.h | 6 +----- arch/alpha/include/asm/pgtable.h | 2 +- arch/alpha/include/asm/processor.h | 8 ++------ arch/alpha/kernel/osf_sys.c | 11 ++--------- 4 files changed, 6 insertions(+), 21 deletions(-)
arch/alpha/include/asm/elf.h +1 -5
@@ -74,7 +74,7 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];/* * This is used to ensure we don't load something for the wrong architecture. */ -#define elf_check_arch (x) ((x)->e_machine == EM_ALPHA) +#define elf_check_arch (x) (((x)->e_machine == EM_ALPHA) && !((x)->e_flags & EF_ALPHA_32BIT))/* * These are used to set parameters in the core dumps.
@@ -139,10 +139,6 @@ extern int dump_elf_task(elf_greg_t *dest, struct task_struct *task); : amask (AMASK_CIX) ? "ev6" : "ev67"); \ }) -#define SET_PERSONALITY (EX ) \ - set_personality(((EX).e_flags & EF_ALPHA_32BIT) \ - ? PER_LINUX_32BIT : PER_LINUX) -extern int alpha_l1i_cacheshape;extern int alpha_l1d_cacheshape;extern int alpha_l2_cacheshape;
arch/alpha/include/asm/pgtable.h +1 -1
@@ -360,7 +360,7 @@ static inline pte_t pte_swp_clear_exclusive(pte_t pte)extern void paging_init (void ); -/* We have our own get_unmapped_area to cope with ADDR_LIMIT_32BIT. */ +/* We have our own get_unmapped_area */ #define HAVE_ARCH_UNMAPPED_AREA #endif /* _ALPHA_PGTABLE_H */
arch/alpha/include/asm/processor.h +2 -6
@@ -8,23 +8,19 @@#ifndef __ASM_ALPHA_PROCESSOR_H#define __ASM_ALPHA_PROCESSOR_H -#include <linux/personality.h> /* for ADDR_LIMIT_32BIT */ -/* * We have a 42-bit user address space: 4TB user VM... */ #define TASK_SIZE (0x40000000000UL) -#define STACK_TOP \ - (current->personality & ADDR_LIMIT_32BIT ? 0x80000000 : 0x00120000000UL) +#define STACK_TOP (0x00120000000UL)#define STACK_TOP_MAX 0x00120000000UL/* This decides where the kernel will search for a free chunk of vm * space during mmap's. */ -#define TASK_UNMAPPED_BASE \ - ((current->personality & ADDR_LIMIT_32BIT) ? 0x40000000 : TASK_SIZE / 2) +#define TASK_UNMAPPED_BASE (TASK_SIZE / 2)/* This is dead. Everything has been moved to thread_info. */ struct thread_struct { };
arch/alpha/kernel/osf_sys.c +2 -9
@@ -1211,8 +1211,7 @@ SYSCALL_DEFINE1(old_adjtimex, struct timex32 __user *, txc_p)return ret; } -/* Get an address range which is currently unmapped. Similar to the -generic version except that we know how to honor ADDR_LIMIT_32BIT. */ +/* Get an address range which is currently unmapped. */ static unsigned long arch_get_unmapped_area_1(unsigned long addr, unsigned long len,
@@ -1234,13 +1233,7 @@ arch_get_unmapped_area(struct file *filp, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags) { - unsigned long limit; - -/* "32 bit" actually means 31 bit, since pointers sign extend. */ -if (current->personality &ADDR_LIMIT_32BIT ) - limit =0x80000000 ; -else - limit =TASK_SIZE ; + unsigned long limit = TASK_SIZE;if (len > limit)return -ENOMEM ;
Signature · 1 line
2.39.5
Sasha Levin
maintainerPATCH 15/15 vboxsf: fix building with GCC 15
In reply to Sasha LevinFrom: Brahmajit Das <[email protected]>
[ Upstream commit 4e7487245abcbc5a1a1aea54e4d3b33c53804bda ]
Building with GCC 15 results in build errorfs/vboxsf/super.c:24:54: error: initializer-string for array of ‘unsigned char’ is too long [-Werror=unterminated-string-initialization]
24 | static const unsigned char VBSF_MOUNT_SIGNATURE[4] = "\000\377\376\375";
| ^~~~~~~~~~~~~~~~~~cc1: all warnings being treated as errors
Due to GCC having enabled -Werror=unterminated-string-initialization[0] by default. Separately initializing each array element of VBSF_MOUNT_SIGNATURE to ensure NUL termination, thus satisfying GCC 15 and fixing the build error.
[0]: https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wno-unterminated-string-initialization
--- fs/vboxsf/super.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/vboxsf/super.c +2 -1
@@ -21,7 +21,8 @@#define VBOXSF_SUPER_MAGIC 0x786f4256/* 'VBox' little endian */ -static const unsigned char VBSF_MOUNT_SIGNATURE [4 ] ="\000\377\376\375" ; +static const unsigned char VBSF_MOUNT_SIGNATURE [4 ] = {'\000' ,'\377' ,'\376' , +'\375' };static int follow_symlinks;module_param (follow_symlinks, int,0444 );
Signature · 1 line
2.39.5