From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 5875F17C203; Fri, 22 May 2026 07:04:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779433483; cv=none; b=UNaBS9fnaqltfCHjmJeR0nDuKMn42QsBcfrKfuWt/amX0aiIuAmjPyin4XCldoFJZajp3nZNT9QTGutmdA3II+IJYwjitb5ckObK2ifI5q7MPKdTmGk5AYIPQ53GMUmAEcqCq/vPi+HasaQtGK9SggCVHAUET0ATIkXXRKNpqRE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779433483; c=relaxed/simple; bh=pGaPkRJjLBU0ZVMzRH7aiXFvgHtcAb7Pw7vhovvBTYo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=JeSDghTCaZnl1lJMaLmWPBk745DLNgoPSpsMOW/xT/RY2u3PE4TWV+SkpSikNAW6XEyzOv1ryQ+p755EgtoETPFN25JfoEVHMZ6D7+PMfQFOlZxEHUFkDQnqAglq9RPaFZ+rksKY7PLiJAYikXZqWBtdYDS/F2Lim3gassKi+mg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=g+LRjRqL; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="g+LRjRqL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E4C51F000E9; Fri, 22 May 2026 07:04:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779433482; bh=aFp5GDZmJgiIz0hUR1vPVo/q1DoBP8S6Nw0YpoABK1E=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=g+LRjRqL9V4us3qiJHeGWbdbJcgKA0FSAShBwseH6gotRLQlycgsX2jt6pwa/xM6l gpbp49qOghmC5nVkhqqIVx2+KBoiniPm7ySsSQYZMT6kd9i5bYx9n23uHUnNP4B8jY 2Pr4mgqfRr/Wbs4OgBBVxE9ZWv1OrcqfwT3Y4jUc= Date: Fri, 22 May 2026 09:03:54 +0200 From: Greg KH To: Jianping Li Cc: Dmitry Baryshkov , amahesh@qti.qualcomm.com, arnd@arndb.de, abelvesa@kernel.org, jorge.ramirez-ortiz@linaro.org, Ekansh Gupta , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, quic_chennak@quicinc.com, stable@kernel.org Subject: Re: [PATCH v5 2/5] misc: fastrpc: Remove buffer from list prior to unmap operation Message-ID: <2026052211-pavilion-compost-5fcd@gregkh> References: <20260515124217.20723-1-jianping.li@oss.qualcomm.com> <20260515124217.20723-3-jianping.li@oss.qualcomm.com> <37146a3a-b18f-40f1-b95b-0ac19bf6c07a@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <37146a3a-b18f-40f1-b95b-0ac19bf6c07a@oss.qualcomm.com> On Fri, May 22, 2026 at 02:55:29PM +0800, Jianping Li wrote: > > On 5/15/2026 9:36 PM, Dmitry Baryshkov wrote: > > On Fri, May 15, 2026 at 08:42:14PM +0800, Jianping Li wrote: > > > From: Ekansh Gupta > > > > > > fastrpc_req_munmap_impl() is called to unmap any buffer. The buffer is > > > getting removed from the list after it is unmapped from DSP. This can > > > create potential race conditions if any other thread removes the entry > > > from list while unmap operation is ongoing. Remove the entry before > > How can it remove the entry from the list? > > Multiple threads sharing the same file descriptor may invoke unmap concurrently. multiple threads sharing the same file descriptor is a horrible userspace bug. If you do that, you get what you deserve :) thanks, greg k-h