<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/misc/mei/main.c, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2026-01-02T11:57:15Z</updated>
<entry>
<title>mei: Fix error handling in mei_register</title>
<updated>2026-01-02T11:57:15Z</updated>
<author>
<name>Ma Ke</name>
<email>make24@iscas.ac.cn</email>
</author>
<published>2025-11-04T02:01:33Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=670c2d09ac5708f6cfd85f9ecd77e9276c8ac948'/>
<id>urn:sha1:670c2d09ac5708f6cfd85f9ecd77e9276c8ac948</id>
<content type='text'>
commit a6dab2f61d23c1eb32f1d08fa7b4919a2478950b upstream.

mei_register() fails to release the device reference in error paths
after device_initialize(). During normal device registration, the
reference is properly handled through mei_deregister() which calls
device_destroy(). However, in error handling paths (such as cdev_alloc
failure, cdev_add failure, etc.), missing put_device() calls cause
reference count leaks, preventing the device's release function
(mei_device_release) from being called and resulting in memory leaks
of mei_device.

Found by code review.

Cc: stable &lt;stable@kernel.org&gt;
Fixes: 7704e6be4ed2 ("mei: hook mei_device on class device")
Signed-off-by: Ma Ke &lt;make24@iscas.ac.cn&gt;
Acked-by: Alexander Usyskin &lt;alexander.usyskin@intel.com&gt;
Link: https://patch.msgid.link/20251104020133.5017-1-make24@iscas.ac.cn
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge patch series "mei: connect to card in D3cold"</title>
<updated>2025-09-18T16:29:34Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2025-09-18T16:29:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=55f6ac4484b342e62640ee4135ab1f1ffbcd5be5'/>
<id>urn:sha1:55f6ac4484b342e62640ee4135ab1f1ffbcd5be5</id>
<content type='text'>
Alexander Usyskin &lt;alexander.usyskin@intel.com&gt; says:

When discrete graphic card enters D3cold th CSC engine is powered down.

On wakeup from the D3cold full HECI link reset is required.  The driver
should detect that firmware requests link reset and initiate the link
reset flow.

In the usual flow the connect IOCTL will trigger the wake from D3cold
and corresponding link reset.  The MEI driver invalidates all open
handles on link reset including the one that triggered the wake
rendering this connection unusable.  To break this loop make connect
detect that it is interrupted by link reset and retry connect attempt
after reset was completed.

Link: https://lore.kernel.org/r/20250918130435.3327400-1-alexander.usyskin@intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mei: retry connect if interrupted by link reset</title>
<updated>2025-09-18T16:29:33Z</updated>
<author>
<name>Alexander Usyskin</name>
<email>alexander.usyskin@intel.com</email>
</author>
<published>2025-09-18T13:04:33Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2b5c4cb2c008f01182f87f529cb104bc5bc80418'/>
<id>urn:sha1:2b5c4cb2c008f01182f87f529cb104bc5bc80418</id>
<content type='text'>
When device is in D3cold the connect message will wake device
and cause link reset.
Link reset flow cleans all queues and wakes all waiters.
Retry the connect flow if connect is failed and link reset is detected.

Signed-off-by: Alexander Usyskin &lt;alexander.usyskin@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/r/20250918130435.3327400-4-alexander.usyskin@intel.com
</content>
</entry>
<entry>
<title>mei: make a local copy of client uuid in connect</title>
<updated>2025-09-18T16:29:33Z</updated>
<author>
<name>Alexander Usyskin</name>
<email>alexander.usyskin@intel.com</email>
</author>
<published>2025-09-18T13:04:32Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=bb29fc32ae56393269d8fe775159fd59e45682d1'/>
<id>urn:sha1:bb29fc32ae56393269d8fe775159fd59e45682d1</id>
<content type='text'>
Connect ioctl has the same memory for in and out parameters.
Copy in parameter (client uuid) to the local stack to avoid it be
overwritten by out parameters fill.

Signed-off-by: Alexander Usyskin &lt;alexander.usyskin@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/r/20250918130435.3327400-3-alexander.usyskin@intel.com
</content>
</entry>
<entry>
<title>mei: gsc: fix remove operations order</title>
<updated>2025-09-18T16:27:40Z</updated>
<author>
<name>Alexander Usyskin</name>
<email>alexander.usyskin@intel.com</email>
</author>
<published>2025-09-15T12:45:54Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=68be6c432cfa84abe908668b0d5c26060f2fe589'/>
<id>urn:sha1:68be6c432cfa84abe908668b0d5c26060f2fe589</id>
<content type='text'>
The mei disconnect should be the last operation in remove flow.
Otherwise the device is used after destruction.
Fix minor free flow that happens after device destruction too.

The fault leads to the following oops in Intel Gfx CI:

&lt;4&gt;[  267.871331] Oops: general protection fault, probably for non-canonical address 0x6b6b6b6b6b6b6bcb: 0000 [#1] SMP NOPTI
...
&lt;4&gt;[  267.871410] RIP: 0010:mei_gsc_remove+0x44/0x90 [mei_gsc]
...
&lt;4&gt;[  267.871555] Call Trace:
&lt;4&gt;[  267.871562]  &lt;TASK&gt;
&lt;4&gt;[  267.871570]  auxiliary_bus_remove+0x1b/0x30
&lt;4&gt;[  267.871589]  device_remove+0x43/0x80
&lt;4&gt;[  267.871604]  device_release_driver_internal+0x215/0x280
&lt;4&gt;[  267.871619]  device_release_driver+0x12/0x20
&lt;4&gt;[  267.871630]  bus_remove_device+0xdc/0x150
&lt;4&gt;[  267.871645]  device_del+0x15f/0x3b0
&lt;4&gt;[  267.871656]  ? bus_unregister_notifier+0x37/0x50
&lt;4&gt;[  267.871672]  gsc_destroy_one.isra.0+0x44/0x210 [i915]
&lt;4&gt;[  267.872295]  intel_gsc_fini+0x28/0x50 [i915]
&lt;4&gt;[  267.872860]  intel_gt_driver_unregister+0x2c/0x80 [i915]
&lt;4&gt;[  267.873300]  i915_driver_remove+0x6e/0x150 [i915]
&lt;4&gt;[  267.873694]  i915_pci_remove+0x1e/0x40 [i915]
&lt;4&gt;[  267.874095]  pci_device_remove+0x3e/0xb0
&lt;4&gt;[  267.874111]  device_remove+0x43/0x80
&lt;4&gt;[  267.874126]  device_release_driver_internal+0x215/0x280
&lt;4&gt;[  267.874137]  ? bus_find_device+0xa5/0xe0
&lt;4&gt;[  267.874153]  device_driver_detach+0x14/0x20
&lt;4&gt;[  267.874164]  unbind_store+0xac/0xc0
&lt;4&gt;[  267.874178]  drv_attr_store+0x21/0x50
&lt;4&gt;[  267.874190]  sysfs_kf_write+0x4a/0x80
&lt;4&gt;[  267.874204]  kernfs_fop_write_iter+0x188/0x240
&lt;4&gt;[  267.874222]  vfs_write+0x283/0x540
&lt;4&gt;[  267.874241]  ksys_write+0x6f/0xf0
&lt;4&gt;[  267.874253]  __x64_sys_write+0x19/0x30
&lt;4&gt;[  267.874264]  x64_sys_call+0x79/0x26a0
&lt;4&gt;[  267.874277]  do_syscall_64+0x93/0xd50
&lt;4&gt;[  267.874291]  ? do_syscall_64+0x1a2/0xd50
&lt;4&gt;[  267.874301]  ? do_syscall_64+0x1a2/0xd50
&lt;4&gt;[  267.874313]  ? do_syscall_64+0x1a2/0xd50
&lt;4&gt;[  267.874324]  ? clear_bhb_loop+0x30/0x80
&lt;4&gt;[  267.874336]  ? clear_bhb_loop+0x30/0x80
&lt;4&gt;[  267.874349]  entry_SYSCALL_64_after_hwframe+0x76/0x7e

Fixes: 7704e6be4ed2 ("mei: hook mei_device on class device")
Signed-off-by: Alexander Usyskin &lt;alexander.usyskin@intel.com&gt;
Link: https://lore.kernel.org/r/20250915124554.2263330-1-alexander.usyskin@intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mei: hook mei_device on class device</title>
<updated>2025-09-06T17:50:54Z</updated>
<author>
<name>Alexander Usyskin</name>
<email>alexander.usyskin@intel.com</email>
</author>
<published>2025-08-26T12:56:17Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7704e6be4ed2835832c445807cdcb2d56d8a8430'/>
<id>urn:sha1:7704e6be4ed2835832c445807cdcb2d56d8a8430</id>
<content type='text'>
mei_device lifetime was managed by devm procedure of parent device.
But such memory is freed on device_del.
Mei_device object is used by client object that may be alive after
parent device is removed.
It may lead to use-after-free if discrete graphics driver unloads
mei_gsc auxiliary device while user-space holds open handle to mei
character device.

Connect mei_device structure lifteme to mei class device lifetime
by adding mei_device free to class device remove callback.

Move exising parent device pointer to separate field in mei_device
to avoid misuse.

Allocate character device dynamically and allow to control its own
lifetime as it may outlive mei_device structure while character
device closes after parent device is removed from the system.

Leave power management on parent device as we overwrite pci runtime
pm procedure and user-space is expecting it there.

Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14201
Signed-off-by: Alexander Usyskin &lt;alexander.usyskin@intel.com&gt;
Link: https://lore.kernel.org/r/20250826125617.1166546-1-alexander.usyskin@intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>mei: more prints with client prefix</title>
<updated>2025-07-19T07:57:55Z</updated>
<author>
<name>Alexander Usyskin</name>
<email>alexander.usyskin@intel.com</email>
</author>
<published>2025-07-17T14:11:11Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=631ae0c01010ba20a42889fb8b6d902fa02d76c1'/>
<id>urn:sha1:631ae0c01010ba20a42889fb8b6d902fa02d76c1</id>
<content type='text'>
Use client-aware print macro instead of usual device print in more
places to expand debug-ability.
The client-aware print macro prefixes the usual device print with
current connection endpoints.

Signed-off-by: Alexander Usyskin &lt;alexander.usyskin@intel.com&gt;
Link: https://lore.kernel.org/r/20250717141112.1696482-3-alexander.usyskin@intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>[tree-wide] finally take no_llseek out</title>
<updated>2024-09-27T15:18:43Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2024-09-27T01:56:11Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=cb787f4ac0c2e439ea8d7e6387b925f74576bdf8'/>
<id>urn:sha1:cb787f4ac0c2e439ea8d7e6387b925f74576bdf8</id>
<content type='text'>
no_llseek had been defined to NULL two years ago, in commit 868941b14441
("fs: remove no_llseek")

To quote that commit,

  At -rc1 we'll need do a mechanical removal of no_llseek -

  git grep -l -w no_llseek | grep -v porting.rst | while read i; do
	sed -i '/\&lt;no_llseek\&gt;/d' $i
  done

  would do it.

Unfortunately, that hadn't been done.  Linus, could you do that now, so
that we could finally put that thing to rest? All instances are of the
form
	.llseek = no_llseek,
so it's obviously safe.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mei: demote client disconnect warning on suspend to debug</title>
<updated>2024-06-04T15:11:44Z</updated>
<author>
<name>Alexander Usyskin</name>
<email>alexander.usyskin@intel.com</email>
</author>
<published>2024-05-30T09:14:15Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1db5322b7e6b58e1b304ce69a50e9dca798ca95b'/>
<id>urn:sha1:1db5322b7e6b58e1b304ce69a50e9dca798ca95b</id>
<content type='text'>
Change level for the "not connected" client message in the write
callback from error to debug.

The MEI driver currently disconnects all clients upon system suspend.
This behavior is by design and user-space applications with
open connections before the suspend are expected to handle errors upon
resume, by reopening their handles, reconnecting,
and retrying their operations.

However, the current driver implementation logs an error message every
time a write operation is attempted on a disconnected client.
Since this is a normal and expected flow after system resume
logging this as an error can be misleading.

Signed-off-by: Alexander Usyskin &lt;alexander.usyskin@intel.com&gt;
Signed-off-by: Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Link: https://lore.kernel.org/r/20240530091415.725247-1-tomas.winkler@intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>misc: mei: main.c: fix kernel-doc warnings</title>
<updated>2023-10-18T08:01:34Z</updated>
<author>
<name>Randy Dunlap</name>
<email>rdunlap@infradead.org</email>
</author>
<published>2023-10-12T02:48:45Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3b54a111bb7e558e4a40e483ded7c123fe94382c'/>
<id>urn:sha1:3b54a111bb7e558e4a40e483ded7c123fe94382c</id>
<content type='text'>
Fix kernel-doc warnings in main.c:

main.c:465: warning: contents before sections
main.c:590: warning: missing initial short description on line:
 * mei_ioctl_client_notify_request -

Signed-off-by: Randy Dunlap &lt;rdunlap@infradead.org&gt;
Cc: Tomas Winkler &lt;tomas.winkler@intel.com&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/r/20231012024845.29169-8-rdunlap@infradead.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
