lkml.org 
[lkml]   [2020]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: general protection fault in strncasecmp
Date
Hillf Danton <hdanton@sina.com> wrote:

> + /*
> + * care to detect writers because
> + *
> + * read_seqbegin_or_lock(&net->cells_lock, &seq);
> + *
> + * is unable to block
> + *
> + * write_seqlock(&net->cells_lock);
> + *
> + */

That shouldn't be true. The loop may make one or two passes, the first
without the lock, the second with. The RCU read lock is supposed to be held
in both cases too (but see below).

One of the call sites, however, afs_probe_cell_name(), doesn't call
afs_lookup_cell_rcu() with the RCU read lock held - which is an error, but not
obviously the one that's biting here.

David

\
 
 \ /
  Last update: 2020-10-09 12:05    [W:1.026 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site