lkml.org 
[lkml]   [2022]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1] sysfs: fix sysfs_kf_seq_show null pointer dereference
On Tue, Jun 14, 2022 at 07:28:31PM +0200, Greg Kroah-Hartman wrote:
> On Tue, Jun 14, 2022 at 05:24:01PM +0000, Will McVicker wrote:
> > When the kobj->ktype is null,
>
> How can that happen? What in-tree code does that?

Yes, I'd be really curious how we arrived there. I we ever end in
this case we're having a major problem, as all the sysfs files
should go through sysfs_add_file_mode_ns, which already derferences
kobj->ktype->sysfs_ops directly. I.e. for this to happen
kobj->ktype must have been cleared on a live file, or someone
must have bypassed sysfs_add_file_mode_ns.

\
 
 \ /
  Last update: 2022-06-15 19:54    [W:0.055 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site