All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joshua Crofts <crofts@kernel.org>
To: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Cc: jikos@kernel.org, jic23@kernel.org, bentiss@kernel.org,
	linux-input@vger.kernel.org, linux-iio@vger.kernel.org,
	linux-kernel@vger.kernel.org, simeon@maryasin.name,
	lixu.zhang@intel.com
Subject: Re: [PATCH v2 2/7] HID: sensor: custom: Set owner for misc device
Date: Thu, 5 Nov 2026 10:57:14 +0100	[thread overview]
Message-ID: <20261105105714.0000307e@kernel.org> (raw)
In-Reply-To: <20261104201403.2039921-3-srinivas.pandruvada@linux.intel.com>

On Wed,  4 Nov 2026 12:13:58 -0800
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> wrote:

> Set .owner in the misc-device file operations so open file descriptors
> keep the module loaded until their release callbacks have completed.
> 
> Fixes: 4a7de0519df5 ("HID: sensor: Custom and Generic sensor support")
> Reported-by: Семён Марьясин <simeon@maryasin.name>
> Closes: https://lore.kernel.org/all/CAM2dg7ewfVJSP4rFyhkCB1Rmd1+X56sAg=eUdbPthG2xrLqwQQ@mail.gmail.com/
> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> ---
>  drivers/hid/hid-sensor-custom.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/hid/hid-sensor-custom.c b/drivers/hid/hid-sensor-custom.c
> index c2b425afd951..72e5639cb1d9 100644
> --- a/drivers/hid/hid-sensor-custom.c
> +++ b/drivers/hid/hid-sensor-custom.c
> @@ -719,6 +719,7 @@ static __poll_t hid_sensor_custom_poll(struct file *file,
>  }
>  
>  static const struct file_operations hid_sensor_custom_fops = {
> +	.owner = THIS_MODULE,
>  	.open =  hid_sensor_custom_open,
>  	.read =  hid_sensor_custom_read,
>  	.release = hid_sensor_custom_release,

Reviewed-by: Joshua Crofts <crofts@kernel.org>

-- 
Kind regards,
Joshua Crofts

  reply	other threads:[~2026-11-05  9:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04 20:13 [PATCH v2 0/7] HID: sensor: custom: use-after-freec after remove Srinivas Pandruvada
2026-11-04 20:13 ` [PATCH v2 1/7] HID: sensor: hub: Synchronize callback removal with raw events Srinivas Pandruvada
2026-11-05  9:56   ` Joshua Crofts
2026-11-07 20:13   ` Jonathan Cameron
2026-11-04 20:13 ` [PATCH v2 2/7] HID: sensor: custom: Set owner for misc device Srinivas Pandruvada
2026-11-05  9:57   ` Joshua Crofts [this message]
2026-11-04 20:13 ` [PATCH v2 3/7] HID: sensor: custom: Disable sensor before hub close on removal Srinivas Pandruvada
2026-11-05 10:21   ` Joshua Crofts
2026-11-04 20:14 ` [PATCH v2 4/7] HID: sensor: custom: Fix state lifetime during removal Srinivas Pandruvada
2026-11-07 20:21   ` Jonathan Cameron
2026-11-04 20:14 ` [PATCH v2 5/7] HID: sensor: custom: Serialize misc device reads Srinivas Pandruvada
2026-11-04 20:14 ` [PATCH v2 6/7] HID: sensor: custom: Register enable attribute after misc device Srinivas Pandruvada
2026-11-04 20:25   ` sashiko-bot
2026-11-04 22:04     ` srinivas pandruvada
2026-11-07 20:16   ` Jonathan Cameron
2026-11-04 20:14 ` [PATCH v2 7/7] HID: sensor: hub: Remove clients before stopping hardware Srinivas Pandruvada
2026-11-07 20:08 ` [PATCH v2 0/7] HID: sensor: custom: use-after-freec after remove Jonathan Cameron

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=20261105105714.0000307e@kernel.org \
    --to=crofts@kernel.org \
    --cc=bentiss@kernel.org \
    --cc=jic23@kernel.org \
    --cc=jikos@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lixu.zhang@intel.com \
    --cc=simeon@maryasin.name \
    --cc=srinivas.pandruvada@linux.intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.