Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 96EB4212FA9 for ; Wed, 22 Jan 2025 14:16:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737555402; cv=none; b=hYr0JiumwdygwB7p0bpfmf2W6z156V5gCv2NRHwT7ZkfrFpiYBnpaYxtCC8Z7/eDy9j+3SNJOSCHd1yOvRR0CyxXWBMdQnQWKpo9YVsI7wrvH+txmlerjzeiahf6l9vK7gdnMrlQ2FRyczMXZPCsZ8PcRb6n5dvj2QLhYIVR2/k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737555402; c=relaxed/simple; bh=wwiAc4uHzDhzN1y0pYvy+Vh6nvBwu8EpslXxawGUIyw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=CB0va6OKvfAZKEboBt3UcJYGY5NU3x6VTp6O1jVLzYNfd+i56AmjaJflGPJIjjaFz8sroLP5+6YGXl8S3IwrepanvUnhK6DMgKTf/SxMSuKqogQgg0Qrygyd+/+qslKaZ+o6/cvXRM9s2jPDdANVoXP10LPMYMYIVWlAUdHzhhc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uvb1wlxa; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uvb1wlxa" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 08DCEC4CED2; Wed, 22 Jan 2025 14:16:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1737555402; bh=wwiAc4uHzDhzN1y0pYvy+Vh6nvBwu8EpslXxawGUIyw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uvb1wlxas3g1dDn/CfN82msZXJGaqMKSZmsACngRGlLDclKfX22AB1qQb7TbGcD9I bYo4WHuKilIxOZli1F+NSEEfiJ6BJiuyisbM6AHgzvyZRYRwJzmOXBXRBLACwSZbKw qGfYLmMOJt909A/GSY5u8BzebxPdAz80XOyRQrkoMuSWVioV9olgEeYfEzL2Waz5QS +eciunUH9qFmRnCNZRk5jDzm1lIEKODW8Rjn9/dlmaywwcLHCVYSgILYzFmUkEN9JQ 7dzNZ7XNrKpL1ZHVpIQbT5bnT3JqW7gQVfRWBr8b4tJS3oSJMaSbyXGD3S0iNifkS5 b3MK2wJEOSJOQ== From: Sasha Levin To: stable@vger.kernel.org Cc: Finn Thain , Sasha Levin Subject: Re: [PATCH 5.4.y] m68k: Add missing mmap_read_lock() to sys_cacheflush() Date: Wed, 22 Jan 2025 09:16:40 -0500 Message-Id: <20250122081011-e522c933a100f4f1@stable.kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: References: Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit [ Sasha's backport helper bot ] Hi, The upstream commit SHA1 provided is correct: f829b4b212a315b912cb23fd10aaf30534bb5ce9 WARNING: Author mismatch between patch and upstream commit: Backport author: Finn Thain Commit author: Liam Howlett Status in newer kernel trees: 6.12.y | Present (exact SHA1) 6.6.y | Present (exact SHA1) 6.1.y | Present (exact SHA1) 5.15.y | Present (exact SHA1) 5.10.y | Present (different SHA1: 58ee5a0de192) 5.4.y | Not found Note: The patch differs from the upstream commit: --- 1: f829b4b212a31 ! 1: 9f4fbaa4b6d79 m68k: Add missing mmap_read_lock() to sys_cacheflush() @@ Metadata ## Commit message ## m68k: Add missing mmap_read_lock() to sys_cacheflush() + [ Upstream commit f829b4b212a315b912cb23fd10aaf30534bb5ce9 ] + When the superuser flushes the entire cache, the mmap_read_lock() is not taken, but mmap_read_unlock() is called. Add the missing mmap_read_lock() call. @@ Commit message Reviewed-by: Matthew Wilcox (Oracle) Link: https://lore.kernel.org/r/20210407200032.764445-1-Liam.Howlett@Oracle.com Signed-off-by: Geert Uytterhoeven + [ mmap_read_lock() open-coded using down_read() as was done prior to v5.8 ] + Signed-off-by: Finn Thain ## arch/m68k/kernel/sys_m68k.c ## @@ arch/m68k/kernel/sys_m68k.c: sys_cacheflush (unsigned long addr, int scope, int cache, unsigned long len) @@ arch/m68k/kernel/sys_m68k.c: sys_cacheflush (unsigned long addr, int scope, int if (!capable(CAP_SYS_ADMIN)) goto out; + -+ mmap_read_lock(current->mm); ++ down_read(¤t->mm->mmap_sem); } else { struct vm_area_struct *vma; --- Results of testing on various branches: | Branch | Patch Apply | Build Test | |---------------------------|-------------|------------| | stable/linux-5.4.y | Success | Success |