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 17799425877; Thu, 16 Jul 2026 13:47:41 +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=1784209672; cv=none; b=sRyziOl86OJZZQnwu3fKC4cykOt/H6Bl/eZlmvfZZUFYERvpTd5UcwR9vQCJum4rGGJDD0CawJrL0k6rFKWv2nIjfw+HHtGlGoxlOQzYhHpQ4h1ShjNxLygDuEBDEvWSMlw+X9b7VABkjANBj8juqgppceipFLJLELaCLqz9yp8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784209672; c=relaxed/simple; bh=wggnLZGxnu+uYY74IrN95bI9MLVVYGRlqvnUfy2+lWg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=tcBFmjNjrQhUL2xaXxRDpxx1LbP/JA/2cuqEn8NxdPcOxBZ4xInvoVgotNg3LUHrTYzvxoIZeU7eSde4NlfaxAlPoP+WCc2VxEuXTr0zoTWcfyKrZPtDao7uJ6JYIbdDozNecmuBaE9sm51MCbIQn2AV+DwTk5pVovXXKddl4GU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ncQpSphE; 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="ncQpSphE" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C43881F000E9; Thu, 16 Jul 2026 13:47:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1784209660; bh=TU4DH/xxRs9m+7WNEUikdAmu4gI1JcAJZeULzKbq28M=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ncQpSphE5l07nEVo42g2ojJWPnQ+Mz480UPUWs/7BiT1KXdJR6PZGjEG6/0bWdRix SbCozl1mnmGTKKi6huhtGIF4PDquaI/3q2FXNd7/9djeR1jd3V/0tDNl9l+bWT/deH bik+rJYjgAwnQMdg42+1AbVSzpX+qU8yDIpWt1Pk= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Sashiko-bot , Dmitry Torokhov , Jinmo Yang , Benjamin Tissoires Subject: [PATCH 7.1 271/518] HID: wacom: use GFP_ATOMIC in wacom_wac_queue_flush() Date: Thu, 16 Jul 2026 15:28:59 +0200 Message-ID: <20260716133053.745041778@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260716133047.772246337@linuxfoundation.org> References: <20260716133047.772246337@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 7.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jinmo Yang commit 55f1ad573e34abf9a0443c34bc5a63d74edba7d7 upstream. wacom_wac_queue_flush() is called via the .raw_event callback (wacom_raw_event → wacom_wac_pen_serial_enforce → wacom_wac_queue_flush). For USB HID devices, this callback is invoked from hid_irq_in(), which is a URB completion handler running in atomic context. Using GFP_KERNEL in this path can sleep, leading to a "scheduling while atomic" bug. Use GFP_ATOMIC instead. The existing code already handles allocation failure by skipping the fifo entry and continuing. Reported-by: Sashiko-bot Fixes: 5e013ad20689 ("HID: wacom: Remove static WACOM_PKGLEN_MAX limit") Cc: stable@vger.kernel.org Reviewed-by: Dmitry Torokhov Signed-off-by: Jinmo Yang Signed-off-by: Benjamin Tissoires Signed-off-by: Greg Kroah-Hartman --- drivers/hid/wacom_sys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/hid/wacom_sys.c +++ b/drivers/hid/wacom_sys.c @@ -76,7 +76,7 @@ static void wacom_wac_queue_flush(struct unsigned int count; int err; - buf = kzalloc(size, GFP_KERNEL); + buf = kzalloc(size, GFP_ATOMIC); if (!buf) { kfifo_skip(fifo); continue;