Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: fnic: Do not use GFP_ZERO for mempools

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>
Link: https://patch.msgid.link/20260217223943.7938-2-kartilak@cisco.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Karan Tilak Kumar and committed by
Martin K. Petersen
a59d1caf 0e07baae

+4 -4
+4 -4
drivers/scsi/fnic/fnic_fcs.c
··· 519 519 520 520 spin_unlock_irqrestore(&fnic->fnic_lock, flags); 521 521 522 - frame_elem = mempool_alloc(fnic->frame_elem_pool, 523 - GFP_ATOMIC | __GFP_ZERO); 522 + frame_elem = mempool_alloc(fnic->frame_elem_pool, GFP_ATOMIC); 524 523 if (!frame_elem) { 525 524 FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num, 526 525 "Failed to allocate memory for frame elem"); 527 526 goto drop; 528 527 } 528 + memset(frame_elem, 0, sizeof(struct fnic_frame_list)); 529 529 frame_elem->fp = fp; 530 530 frame_elem->rx_ethhdr_stripped = ethhdr_stripped; 531 531 frame_elem->frame_len = bytes_written; ··· 704 704 */ 705 705 if ((fnic->state != FNIC_IN_FC_MODE) 706 706 && (fnic->state != FNIC_IN_ETH_MODE)) { 707 - frame_elem = mempool_alloc(fnic->frame_elem_pool, 708 - GFP_ATOMIC | __GFP_ZERO); 707 + frame_elem = mempool_alloc(fnic->frame_elem_pool, GFP_ATOMIC); 709 708 if (!frame_elem) { 710 709 FNIC_FCS_DBG(KERN_INFO, fnic->host, fnic->fnic_num, 711 710 "Failed to allocate memory for frame elem"); 712 711 return -ENOMEM; 713 712 } 713 + memset(frame_elem, 0, sizeof(struct fnic_frame_list)); 714 714 715 715 FNIC_FCS_DBG(KERN_DEBUG, fnic->host, fnic->fnic_num, 716 716 "Queueing FC frame: sid/did/type/oxid = 0x%x/0x%x/0x%x/0x%x\n",