diff options
author | Mike Christie <michael.christie@oracle.com> | 2021-09-29 21:04:20 -0500 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-10-18 22:38:36 -0400 |
commit | 1283c0d1a32bb924324481586b5d6e8e76f676ba (patch) | |
tree | a177b47a3e421c996399f921b19d073913180ca4 /fs/timerfd.c | |
parent | ed1227e080990ffec5bf39006ec8a57358e6689a (diff) | |
download | linux-stable-1283c0d1a32bb924324481586b5d6e8e76f676ba.tar.gz linux-stable-1283c0d1a32bb924324481586b5d6e8e76f676ba.tar.bz2 linux-stable-1283c0d1a32bb924324481586b5d6e8e76f676ba.zip |
scsi: target: Fix alua_tg_pt_gps_count tracking
We can't free the tg_pt_gp in core_alua_set_tg_pt_gp_id() because it's
still accessed via configfs. Its release must go through the normal
configfs/refcount process.
The max alua_tg_pt_gps_count check should probably have been done in
core_alua_allocate_tg_pt_gp(), but with the current code userspace could
have created 0x0000ffff + 1 groups, but only set the id for 0x0000ffff.
Then it could have deleted a group with an ID set, and then set the ID for
that extra group and it would work ok.
It's unlikely, but just in case this patch continues to allow that type of
behavior, and just fixes the kfree() while in use bug.
Link: https://lore.kernel.org/r/20210930020422.92578-4-michael.christie@oracle.com
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'fs/timerfd.c')
0 files changed, 0 insertions, 0 deletions