In the Linux kernel, the following vulnerability has been resolved: rapidio: fix possible UAF when kfifoalloc() fails If kfifoalloc() fails in mportcdevopen(), goto errfifo and just free priv. But priv is still in the chdev->filelist, then list traversal may cause UAF. This fixes the following smatch warning: drivers/rapidio/devices/riomportcdev.c:1930 mportcdevopen() warn: '&priv->list' not removed from list