Merge tag 'powerpc-6.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux

Pull powerpc fixes from Michael Ellerman:

- Prevent use-after-free in 64-bit KVM VFIO

- Add generated Power8 crypto asm to .gitignore

Thanks to Al Viro and Nathan Lynch.

* tag 'powerpc-6.10-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
KVM: PPC: Book3S HV: Prevent UAF in kvm_spapr_tce_attach_iommu_group()
powerpc/crypto: Add generated P8 asm to .gitignore

+15 -5
+2
arch/powerpc/crypto/.gitignore
··· 1 1 # SPDX-License-Identifier: GPL-2.0-only 2 2 aesp10-ppc.S 3 + aesp8-ppc.S 3 4 ghashp10-ppc.S 5 + ghashp8-ppc.S
+13 -5
arch/powerpc/kvm/book3s_64_vio.c
··· 130 130 } 131 131 rcu_read_unlock(); 132 132 133 - fdput(f); 134 - 135 - if (!found) 133 + if (!found) { 134 + fdput(f); 136 135 return -EINVAL; 136 + } 137 137 138 138 table_group = iommu_group_get_iommudata(grp); 139 - if (WARN_ON(!table_group)) 139 + if (WARN_ON(!table_group)) { 140 + fdput(f); 140 141 return -EFAULT; 142 + } 141 143 142 144 for (i = 0; i < IOMMU_TABLE_GROUP_MAX_TABLES; ++i) { 143 145 struct iommu_table *tbltmp = table_group->tables[i]; ··· 160 158 break; 161 159 } 162 160 } 163 - if (!tbl) 161 + if (!tbl) { 162 + fdput(f); 164 163 return -EINVAL; 164 + } 165 165 166 166 rcu_read_lock(); 167 167 list_for_each_entry_rcu(stit, &stt->iommu_tables, next) { ··· 174 170 /* stit is being destroyed */ 175 171 iommu_tce_table_put(tbl); 176 172 rcu_read_unlock(); 173 + fdput(f); 177 174 return -ENOTTY; 178 175 } 179 176 /* ··· 182 177 * its KVM reference counter and can return. 183 178 */ 184 179 rcu_read_unlock(); 180 + fdput(f); 185 181 return 0; 186 182 } 187 183 rcu_read_unlock(); ··· 190 184 stit = kzalloc(sizeof(*stit), GFP_KERNEL); 191 185 if (!stit) { 192 186 iommu_tce_table_put(tbl); 187 + fdput(f); 193 188 return -ENOMEM; 194 189 } 195 190 ··· 199 192 200 193 list_add_rcu(&stit->next, &stt->iommu_tables); 201 194 195 + fdput(f); 202 196 return 0; 203 197 } 204 198