Skip to content
Commit 1e957188 authored by Ming Lei's avatar Ming Lei Committed by Greg Kroah-Hartman
Browse files

cgroup: cgroup_get_from_id() must check the looked-up kn is a directory

commit df02452f

 upstream.

cgroup has to be one kernfs dir, otherwise kernel panic is caused,
especially cgroup id is provide from userspace.

Reported-by: default avatarMarco Patalano <mpatalan@redhat.com>
Fixes: 6b658c48

 ("scsi: cgroup: Add cgroup_get_from_id()")
Cc: Muneendra <muneendra.kumar@broadcom.com>
Signed-off-by: default avatarMing Lei <ming.lei@redhat.com>
Acked-by: default avatarMukesh Ojha <quic_mojha@quicinc.com>
Cc: stable@vger.kernel.org # v5.14+
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a899ba61
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment