From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D34FC3B4E9F for ; Wed, 1 Jul 2026 06:58:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782889120; cv=none; b=gDu5URs0/6YrTldSYiJaHKGRtbu8n8g40Cec7+xVONJS8inzWgQDzEXxb6p7Dt4INIPP2uM10Ic+iiex8JybLyVi7PNvRdbJ1t3lXKxi30bJPQd4FcvakBqKB2y//4gPB0J4CG975woVZJ3DVCQTnsjKSDsVVAG8h/KhDx7y48E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782889120; c=relaxed/simple; bh=4/PJ5lsWF3Afw+ToM28IlvUIg6tJ1pzhObLbDR7BvMM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=hTalIQmEikuW0j3BJI9rTk9ZpQiFgpuH/HJrKLcA7qK5zwk6TvXsqh1/VUSCUqE603YIEE8CEBsZZdfhYo9/mxHSciMZbL/BEK5+5h7yCv8dj5eVQvAFBW61P5P+R4T8EDEBmbFrDfxgPpHN21iIw1hvsZEfeJwxlPiR36elv1o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=eik3WZ68; arc=none smtp.client-ip=209.85.221.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="eik3WZ68" Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-470174001a0so215737f8f.0 for ; Tue, 30 Jun 2026 23:58:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1782889117; x=1783493917; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=E6Htvg5E3KMoFbz7ZumeUAsKal7KTQSoqOUgZpdirn4=; b=eik3WZ68aZwuvvJAFOAxtHJVhbCx5343pj2kEwr1pls1NootrMVLmyBnpDZzmE3Wsi I9/dbBNuWPV+9X35qY2wUiuYXt6aBfkg6EQxkoE9jBgNyT5sHEJMxyliJVXLTy4ObzO3 5zTRsequk+bWD0iOrPLihazJ83x/b+eoaZV4l3frRh3s12HwS4DvstylWMcrfBgW/EXY SFhzDdAfH2ZT5txtEhgOW2fXY+p/Qd8MJqTVL5EQfw4lbzcBK8vWmq9yyJgBl8/EWMVB IL6FeUHM8Z4kUNUfX8E2nWbKVdifvpLHglAqq09yE2ov6YMKh3qxWFqtDrINYS/GGotX y1ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782889117; x=1783493917; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=E6Htvg5E3KMoFbz7ZumeUAsKal7KTQSoqOUgZpdirn4=; b=JMvXZlepN8X4jOKq0leUnvOkM4IvrseJsOmNAKZBEWkiQ0K7lwyC6W63cQ32AeFrsU zf6iiuvTL3Y/h/LgpXqGf0haukzEoEA9UWWe9tg/7DS0sjn4TjErThp7rUl13CrJDehY 2Gx7H3HdfnJu4ctTF4NXeVeO5aWhPelDf5fExuHL+Jh5eI/yn7BCP0xCr4M5ZHiIbDRE FGtUd0DVa7hIlt/SGDI2dQln/Ji0aNEjzKnyCUaD/ZmKh0aD7INeNAw03VlnYDx42rsC la6kVp9arflQZpxXWVN/3BbfTkXlzotoGuwQAa9qxFRA9B7ZPQkeVx/BDg7Wqg6dQ+LM K+mQ== X-Forwarded-Encrypted: i=1; AHgh+RqKIzr7mNGAGEjtYMrjhKkSXoNvPBdEe/ffcnbVEZIfZHCM7uvZEDsep4V5GbVkWZnsjyhlFQvPTUl9fcs=@vger.kernel.org X-Gm-Message-State: AOJu0Yyg8ya2X4KLjcIjCz1LwssD7SOEX5+CrOguzx2S1i1OK5ZiLRPQ eEuGR/9WFtOKV5n8F57Q4MPGqhL/tdldcpXAzlpVLur9pL2QCNt4KmC1ia5dY91a78zu4nMmH2E 2rCdb X-Gm-Gg: AfdE7cmTp6YLizaWqE5GYQxiTTda1RoWGJHPnqkUQ78mF9TxcXFqINUKdaAzpFzm7/K ApqvCiOHzDDtMv/7DR1UeL90rSlq5ryPMMEnVzPpy8iJT290vCjuKV9tKB/4LLZ1rtM3VK8Oso1 9lc5F9xdzmxLh9zcNiT59/wg/iYwleyUF+CO2P6NfkmQhjnivUv/RLfPHWFqF+SLkXcDtm+6Ch1 p16OAe7zRX30zYdYqIJElAamZqepmrkICrEu52DHQwUijmIH1LlccE/U5M5idyFCemJDlr7YiYX Sd5hZm9QnhMSXZVxcsoiWNjT0EZBWjOKjek9Z2JAk2aUGWbmMG194scHDQuXg/98Jy2D/kRcfz0 9raWDvC5hyINzeqs3Og80R2QpirWEKA0JVpSSzAl6OwJ4STllC4o/fu/pFjQV/R8sfqhfEvcfQ5 7GuUFa5uhbqsEXttQfO3XGkJDuWNqeqkbxbOefWvwcHAB+oiU= X-Received: by 2002:a05:6000:2612:b0:43f:e2b7:7160 with SMTP id ffacd0b85a97d-477574b0599mr505149f8f.4.1782889117243; Tue, 30 Jun 2026 23:58:37 -0700 (PDT) Received: from ?IPV6:2001:a62:1403:d01:fcc2:cfc6:9af3:a0c1? ([2001:a62:1403:d01:fcc2:cfc6:9af3:a0c1]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-476792758aasm7184096f8f.11.2026.06.30.23.58.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 30 Jun 2026 23:58:36 -0700 (PDT) Message-ID: Date: Wed, 1 Jul 2026 08:58:36 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/4] scsi: proc: use kmalloc() in proc writers To: "Mike Rapoport (Microsoft)" , "Martin K. Petersen" Cc: Brian King , "James E.J. Bottomley" , Matthew Wilcox , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org References: <20260630-b4-scsi-v1-0-494fb37ebe7b@kernel.org> <20260630-b4-scsi-v1-2-494fb37ebe7b@kernel.org> Content-Language: en-US From: Hannes Reinecke In-Reply-To: <20260630-b4-scsi-v1-2-494fb37ebe7b@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 6/30/26 12:54 PM, Mike Rapoport (Microsoft) wrote: > proc_scsi_host_write(), proc_scsi_write() and proc_scsi_devinfo_write() > allocate temporary buffers for /proc writes using __get_free_page(). > > These buffers can be allocated with kmalloc() as there's nothing special > about them to go directly to the page allocator. > > kmalloc() provides a better API that does not require ugly casts and > kfree() does not need to know the size of the freed object. > > Replace use of __get_free_page() with kmalloc(). > > Link: https://lore.kernel.org/all/635405e4-9423-4a25-a6e7-e03c8ea0bcbe@redhat.com > Signed-off-by: Mike Rapoport (Microsoft) > --- > drivers/scsi/scsi_devinfo.c | 4 ++-- > drivers/scsi/scsi_proc.c | 9 +++++---- > 2 files changed, 7 insertions(+), 6 deletions(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@suse.com +49 911 74053 688 SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich