lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20260205060906.4059-1-lirongqing@baidu.com>
Date: Thu, 5 Feb 2026 01:09:06 -0500
From: lirongqing <lirongqing@...du.com>
To: Dave Airlie <airlied@...hat.com>, Gerd Hoffmann <kraxel@...hat.com>,
	Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>, Maxime Ripard
	<mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>, David Airlie
	<airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
	<virtualization@...ts.linux.dev>, <spice-devel@...ts.freedesktop.org>,
	<dri-devel@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>
CC: Li RongQing <lirongqing@...du.com>
Subject: [PATCH] drm/qxl: optimize idr_preload allocation flags

From: Li RongQing <lirongqing@...du.com>

idr_preload() is called in a sleepable context before acquiring a
spinlock. Change the allocation flag from GFP_ATOMIC to GFP_KERNEL
to allow direct reclaim and improve allocation success rate under
memory pressure.

Signed-off-by: Li RongQing <lirongqing@...du.com>
---
 drivers/gpu/drm/qxl/qxl_cmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/qxl/qxl_cmd.c b/drivers/gpu/drm/qxl/qxl_cmd.c
index 2e3200d..dd61d2a 100644
--- a/drivers/gpu/drm/qxl/qxl_cmd.c
+++ b/drivers/gpu/drm/qxl/qxl_cmd.c
@@ -423,7 +423,7 @@ int qxl_surface_id_alloc(struct qxl_device *qdev,
 	uint32_t handle;
 	int idr_ret;
 again:
-	idr_preload(GFP_ATOMIC);
+	idr_preload(GFP_KERNEL);
 	spin_lock(&qdev->surf_id_idr_lock);
 	idr_ret = idr_alloc(&qdev->surf_id_idr, NULL, 1, 0, GFP_NOWAIT);
 	spin_unlock(&qdev->surf_id_idr_lock);
-- 
2.9.4


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ