Re: [PATCH] st: don't doublefree pages from scatterlist

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 4 Feb 2006, Kai Makisara wrote:
> On Fri, 3 Feb 2006, Hugh Dickins wrote:
> > 
> > Very interesting.  James can confirm, but I think that means everybody
> > can ignore my drivers/scsi/st.c patch for 2.6.16-rc, and the unposted
> > sg.c patches for the same issue that I was going to send Doug.
> > 
> The patch st is not necessary now but I don't think it would be a bad idea 
> to include it anyway. My reasoning is based on that the patch is very 
> inexpensive, it basically moves freeing of an array to another place. 
> The reasons for inclusion are:
> - someone reviewing the code may wonder why the change to 2.6.15.x is
>   not in 2.6.x >= 16; 2.6.16 would need at least a comment about this
> - it does decouple st from any dependencies about what happens to
>   the s/g array at the lower levels
> - if the s/g array will at some future time be again passed directly to 
>   dma mapping, we would not face the problem again
> 
> I don't have any firm opinion either way.

Fair points, I don't have a firm opinion either, it's entirely up to you
as maintainer.

But I'd be less keen to force the equivalent changes into 2.6.16's sg.c.

Saving sg_pages from get_user_pages fits in quite unobtrusively in st.c,
and its enlarge_buffer/normalize_buffer pages are already safely isolated
from the scatterlist by the separate frp_segs array.  But sg.c presently
uses the scatterlist for the latter case too, so would need more change:
except that, thanks to Mike, we find it doesn't need changing now.
Your suggestion of a comment would be most appropriate there.

(I've not forgotten our outstanding SetPageDirty to set_page_dirty_lock
issue, but still striving to avoid too much nuisance in sg.c's case.)

Hugh
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux