From: Karan Tilak Kumar <kartilak@cisco.com>
To: sebaddel@cisco.com
Cc: arulponn@cisco.com, djhawar@cisco.com, gcboffa@cisco.com,
aeasi@cisco.com, mkai2@cisco.com, satishkh@cisco.com,
jejb@linux.ibm.com, martin.petersen@oracle.com,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
jmeneghi@redhat.com, revers@redhat.com, dan.carpenter@linaro.org,
Karan Tilak Kumar <kartilak@cisco.com>,
Hannes Reinecke <hare@kernel.org>, Lee Duncan <lduncan@suse.com>
Subject: [PATCH 2/5] scsi: fnic: Do not use GFP_ZERO for mempools
Date: Tue, 17 Feb 2026 14:39:40 -0800 [thread overview]
Message-ID: <20260217223943.7938-2-kartilak@cisco.com> (raw)
In-Reply-To: <20260217223943.7938-1-kartilak@cisco.com>
One cannot use the GFP_ZERO flag for mempool allocation, so use
memset() instead.
Tested-by: Karan Tilak Kumar <kartilak@cisco.com>
Reviewed-by: Sesidhar Baddela <sebaddel@cisco.com>
Reviewed-by: Arulprabhu Ponnusamy <arulponn@cisco.com>
Reviewed-by: Gian Carlo Boffa <gcboffa@cisco.com>
Reviewed-by: Arun Easi <aeasi@cisco.com>
Reviewed-by: Hannes Reinecke <hare@kernel.org>
Reviewed-by: Lee Duncan <lduncan@suse.com>
Signed-off-by: Karan Tilak Kumar <kartilak@cisco.com>
Co-developed-by: Hannes Reinecke <hare@kernel.org>
---
drivers/scsi/fnic/fnic_fcs.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/fnic/fnic_fcs.c b/drivers/scsi/fnic/fnic_fcs.c
index f6d6ad64983f..2b543d570051 100644
--- a/drivers/scsi/fnic/fnic_fcs.c
+++ b/drivers/scsi/fnic/fnic_fcs.c
@@ -519,13 +519,13 @@ static void fnic_rq_cmpl_frame_recv(struct vnic_rq *rq, struct cq_desc
spin_unlock_irqrestore(&fnic->fnic_lock, flags);
- frame_elem = mempool_alloc(fnic->frame_elem_pool,
- GFP_ATOMIC | __GFP_ZERO);
+ frame_elem = mempool_alloc(fnic->frame_elem_pool, GFP_ATOMIC);
if (!frame_elem) {
FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Failed to allocate memory for frame elem");
goto drop;
}
+ memset(frame_elem, 0, sizeof(struct fnic_frame_list));
frame_elem->fp = fp;
frame_elem->rx_ethhdr_stripped = ethhdr_stripped;
frame_elem->frame_len = bytes_written;
@@ -704,13 +704,13 @@ fdls_send_fcoe_frame(struct fnic *fnic, void *frame, int frame_size,
*/
if ((fnic->state != FNIC_IN_FC_MODE)
&& (fnic->state != FNIC_IN_ETH_MODE)) {
- frame_elem = mempool_alloc(fnic->frame_elem_pool,
- GFP_ATOMIC | __GFP_ZERO);
+ frame_elem = mempool_alloc(fnic->frame_elem_pool, GFP_ATOMIC);
if (!frame_elem) {
FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num,
"Failed to allocate memory for frame elem");
return -ENOMEM;
}
+ memset(frame_elem, 0, sizeof(struct fnic_frame_list));
FNIC_FCS_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num,
"Queueing FC frame: sid/did/type/oxid = 0x%x/0x%x/0x%x/0x%x\n",
--
2.47.1
next prev parent reply other threads:[~2026-02-17 22:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-17 22:39 [PATCH 1/5] scsi: fnic: Use mempool for receive frames Karan Tilak Kumar
2026-02-17 22:39 ` Karan Tilak Kumar [this message]
2026-02-19 6:06 ` [PATCH 2/5] scsi: fnic: Do not use GFP_ZERO for mempools Dan Carpenter
2026-02-19 19:30 ` Karan Tilak Kumar (kartilak)
2026-02-17 22:39 ` [PATCH 3/5] scsi: fnic: Rename fnic_scsi_fcpio_reset() Karan Tilak Kumar
2026-02-17 22:39 ` [PATCH 4/5] scsi: fnic: Refactor in_remove flag and call to fnic_fcpio_reset() Karan Tilak Kumar
2026-02-17 22:39 ` [PATCH 5/5] scsi: fnic: Bump up version number Karan Tilak Kumar
2026-02-24 19:13 ` [PATCH 1/5] scsi: fnic: Use mempool for receive frames Martin K. Petersen
2026-02-28 22:22 ` Martin K. Petersen
2026-03-01 2:16 ` Martin K. Petersen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260217223943.7938-2-kartilak@cisco.com \
--to=kartilak@cisco.com \
--cc=aeasi@cisco.com \
--cc=arulponn@cisco.com \
--cc=dan.carpenter@linaro.org \
--cc=djhawar@cisco.com \
--cc=gcboffa@cisco.com \
--cc=hare@kernel.org \
--cc=jejb@linux.ibm.com \
--cc=jmeneghi@redhat.com \
--cc=lduncan@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mkai2@cisco.com \
--cc=revers@redhat.com \
--cc=satishkh@cisco.com \
--cc=sebaddel@cisco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®