Re: [PATCH][next] afs: fix a dereference on pointer cell before cell is null checked

2020-10-27 Thread Colin Ian King
On 27/10/2020 11:05, David Howells wrote: > Colin King wrote: > >> @@ -606,7 +605,7 @@ void afs_unuse_cell(struct afs_net *net, struct afs_cell >> *cell, enum afs_cell_tr >> >> u = atomic_read(>ref); >> a = atomic_dec_return(>active); >> -trace_afs_cell(debug_id, u, a, reason);

Re: [PATCH][next] afs: fix a dereference on pointer cell before cell is null checked

2020-10-27 Thread David Howells
Colin King wrote: > @@ -606,7 +605,7 @@ void afs_unuse_cell(struct afs_net *net, struct afs_cell > *cell, enum afs_cell_tr > > u = atomic_read(>ref); > a = atomic_dec_return(>active); > - trace_afs_cell(debug_id, u, a, reason); > + trace_afs_cell(cell->debug_id, u, a,

[PATCH][next] afs: fix a dereference on pointer cell before cell is null checked

2020-10-21 Thread Colin King
From: Colin Ian King Currently the assignment of debug_id dereferences pointer cell before cell has been null checked. Fix this by removing debug_id and use cell->debug_id after cell has been null checked. Addresses-Coverity: ("Dereference before null check") Fixes: dca54a7bbb8c ("afs: Add