Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1460561
| From | Christoph Hellwig <hch@lst.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v5 1/2] Use kmap_atomic when rewriting attached page |
| Date | 2016-08-11 16:20 +0200 |
| Message-ID | <s4YZX-4Uf-19@gated-at.bofh.it> (permalink) |
| References | <s4qbT-6NI-5@gated-at.bofh.it> <s4qbT-6NI-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> +static unsigned int ata_format_dsm_trim_descr(struct scatterlist *sg, u32 num,
> + u64 sector, u32 count)
> +{
> + void *ptr = kmap_atomic(sg_page(sg));
Please use sg_copy_from_buffer to be safe against all corner cases.
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH v5 1/2] Use kmap_atomic when rewriting attached page Christoph Hellwig <hch@lst.de> - 2016-08-11 16:20 +0200
csiph-web