The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Zheng Wang <zyytlz.wz@163.com>
Cc: matt.hsiao@hpe.com, arnd@arndb.de, linux-kernel@vger.kernel.org,
	hackerzheng666@gmail.com, 1395428693sheep@gmail.com,
	alex000young@gmail.com
Subject: Re: [PATCH] misc: hpilo: Fix use after free bug in ilo_remove due to race condition with ilo_open
Date: Mon, 17 Apr 2023 19:43:35 +0200	[thread overview]
Message-ID: <2023041756-scoop-splendor-0e01@gregkh> (raw)
In-Reply-To: <20230417165246.467723-1-zyytlz.wz@163.com>

On Tue, Apr 18, 2023 at 12:52:46AM +0800, Zheng Wang wrote:
> --- a/drivers/misc/hpilo.h
> +++ b/drivers/misc/hpilo.h
> @@ -62,6 +62,7 @@ struct ilo_hwinfo {
>  	spinlock_t fifo_lock;
>  
>  	struct cdev cdev;
> +	struct kref refcnt;

You now have 2 different structures doing reference counting logic on
the same structure.  That's just not ok at all, and is totally broken.

greg k-h

  reply	other threads:[~2023-04-17 17:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-17 16:52 [PATCH] misc: hpilo: Fix use after free bug in ilo_remove due to race condition with ilo_open Zheng Wang
2023-04-17 17:43 ` Greg KH [this message]
2023-04-19  5:29   ` Zheng Hacker
2023-05-02 11:46 ` Dan Carpenter
2023-05-05  4:01   ` Zheng Hacker
2023-05-05  7:30     ` Dan Carpenter
2023-05-05  7:35       ` Zheng Hacker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2023041756-scoop-splendor-0e01@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=1395428693sheep@gmail.com \
    --cc=alex000young@gmail.com \
    --cc=arnd@arndb.de \
    --cc=hackerzheng666@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt.hsiao@hpe.com \
    --cc=zyytlz.wz@163.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox