Skip to content

Commit 5c59789

Browse files
committed
Merge tag 'nvme-6.1-2022-11-18' of git://git.infradead.org/nvme into block-6.1
Pull NVMe fixes from Christoph: "nvme fixes for Linux 6.1 - two more bogus nid quirks (Bean Huo, Tiago Dias Ferreira) - memory leak fix in nvmet (Sagi Grimberg)" * tag 'nvme-6.1-2022-11-18' of git://git.infradead.org/nvme: nvmet: fix a memory leak in nvmet_auth_set_key nvme-pci: add NVME_QUIRK_BOGUS_NID for Netac NV7000 nvme-pci: add NVME_QUIRK_BOGUS_NID for Micron Nitro
2 parents 50a8933 + 0a52566 commit 5c59789

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

drivers/nvme/host/pci.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3489,6 +3489,8 @@ static const struct pci_device_id nvme_id_table[] = {
34893489
NVME_QUIRK_IGNORE_DEV_SUBNQN, },
34903490
{ PCI_DEVICE(0x1344, 0x5407), /* Micron Technology Inc NVMe SSD */
34913491
.driver_data = NVME_QUIRK_IGNORE_DEV_SUBNQN },
3492+
{ PCI_DEVICE(0x1344, 0x6001), /* Micron Nitro NVMe */
3493+
.driver_data = NVME_QUIRK_BOGUS_NID, },
34923494
{ PCI_DEVICE(0x1c5c, 0x1504), /* SK Hynix PC400 */
34933495
.driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
34943496
{ PCI_DEVICE(0x1c5c, 0x174a), /* SK Hynix P31 SSD */
@@ -3519,6 +3521,8 @@ static const struct pci_device_id nvme_id_table[] = {
35193521
.driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
35203522
{ PCI_DEVICE(0x2646, 0x501E), /* KINGSTON OM3PGP4xxxxQ OS21011 NVMe SSD */
35213523
.driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
3524+
{ PCI_DEVICE(0x1f40, 0x5236), /* Netac Technologies Co. NV7000 NVMe SSD */
3525+
.driver_data = NVME_QUIRK_BOGUS_NID, },
35223526
{ PCI_DEVICE(0x1e4B, 0x1001), /* MAXIO MAP1001 */
35233527
.driver_data = NVME_QUIRK_BOGUS_NID, },
35243528
{ PCI_DEVICE(0x1e4B, 0x1002), /* MAXIO MAP1002 */

drivers/nvme/target/auth.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,11 @@ int nvmet_auth_set_key(struct nvmet_host *host, const char *secret,
4545
if (!dhchap_secret)
4646
return -ENOMEM;
4747
if (set_ctrl) {
48+
kfree(host->dhchap_ctrl_secret);
4849
host->dhchap_ctrl_secret = strim(dhchap_secret);
4950
host->dhchap_ctrl_key_hash = key_hash;
5051
} else {
52+
kfree(host->dhchap_secret);
5153
host->dhchap_secret = strim(dhchap_secret);
5254
host->dhchap_key_hash = key_hash;
5355
}

0 commit comments

Comments
 (0)