mirror of
https://github.com/torvalds/linux.git
synced 2024-12-31 23:31:29 +00:00
nvme fix for 5.9:
- fix a recently introduced controller leak (Logan Gunthorpe) -----BEGIN PGP SIGNATURE----- iQI/BAABCgApFiEEgdbnc3r/njty3Iq9D55TZVIEUYMFAl99zuMLHGhjaEBsc3Qu ZGUACgkQD55TZVIEUYPgeg/+Ls+324dbBhVrfAVO0WX02wMEM7ySE4u79SVjkXL/ ZhPQOR+yeB1WlZWtpwF9uK27p9z9YO0n85pVgHA3G/fPdLCpoa55Zh81foEhvTuJ wmolL3E46ewj9Krdh7lD2bj3tBcX0SV2Mx/cB4E+c/Ww+m9OIx2JfwaYoaRwcdYK GsgauxWge2H+4hH/32gKZEWnFVeuX2bLk5aBhNUqvXfVmQpWfS8Ky5RtP0uHPRef 62WpTSPrbZJvL2dj9FxfU+gh//esWdIKjHvZLGbKRWjoUNVArziy5oGRIv5FAIJS OMKBNwG/0VFyoRYruYeGiantcvE7+uFifPxwc9jOMGdgjOinc2FoVkvnRru8sr9V mpS/VujkdF9R4voTd5WJeTuGz3RzIiu2sLSelv+wv88JDJMhj2TXctjSPofp1u1+ Fz4tlYRMfmzliVRl3OXN7xCpy6yARu4lqgkcMV/T8+5RKIquhb+jfUYk3L5Cwav0 CgV1U6LFbCorkSuJpgWc48a7owFE9tbbaat2Je/EB6Hg7JEILVIlehEIZCWccKBP 0Dh8GaHbSWHeM1dWzFiHXVcD56S/P826zlsC/2Pmu4iDJWJNbDbQQnlrvCdVfnqs dfZZ9IhtReVHyYKPe8PGpBnM8T20mdfYbnao2VSRZIGVCWiUJOHm07q0IRTRzJVN Clc= =jhDn -----END PGP SIGNATURE----- Merge tag 'nvme-5.9-2020-10-07' of git://git.infradead.org/nvme into block-5.9 Pull NVMe fix from Christoph: "nvme fix for 5.9: - fix a recently introduced controller leak (Logan Gunthorpe)" * tag 'nvme-5.9-2020-10-07' of git://git.infradead.org/nvme: nvme-core: put ctrl ref when module ref get fail
This commit is contained in:
commit
e0894cd618
@ -3265,8 +3265,10 @@ static int nvme_dev_open(struct inode *inode, struct file *file)
|
||||
}
|
||||
|
||||
nvme_get_ctrl(ctrl);
|
||||
if (!try_module_get(ctrl->ops->module))
|
||||
if (!try_module_get(ctrl->ops->module)) {
|
||||
nvme_put_ctrl(ctrl);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
file->private_data = ctrl;
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user