kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Colin Ian King <colin.king@canonical.com>
To: David Howells <dhowells@redhat.com>
Cc: linux-afs@lists.infradead.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] afs: fix a dereference on pointer cell before cell is null checked
Date: Tue, 27 Oct 2020 11:18:44 +0000	[thread overview]
Message-ID: <5f9c89a1-148d-1d19-7da7-c362887c92f1@canonical.com> (raw)
In-Reply-To: <3189277.1603796746@warthog.procyon.org.uk>

On 27/10/2020 11:05, David Howells wrote:
> Colin King <colin.king@canonical.com> wrote:
> 
>> @@ -606,7 +605,7 @@ void afs_unuse_cell(struct afs_net *net, struct afs_cell *cell, enum afs_cell_tr
>>  
>>  	u = atomic_read(&cell->ref);
>>  	a = atomic_dec_return(&cell->active);
>> -	trace_afs_cell(debug_id, u, a, reason);
>> +	trace_afs_cell(cell->debug_id, u, a, reason);
> 
> It's probably better to read cell->debug_id before calling
> atomic_dec_return().
> 
> I have a patch for this based on a report by Dan Carpenter, so no need to send
> a revised patch.

OK - thanks David
> 
> Thanks,
> David
> 

      reply	other threads:[~2020-10-27 11:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-21 13:11 [PATCH][next] afs: fix a dereference on pointer cell before cell is null checked Colin King
2020-10-27 11:05 ` David Howells
2020-10-27 11:18   ` Colin Ian King [this message]

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=5f9c89a1-148d-1d19-7da7-c362887c92f1@canonical.com \
    --to=colin.king@canonical.com \
    --cc=dhowells@redhat.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-afs@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).