linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marion & Christophe JAILLET <christophe.jaillet@wanadoo.fr>
To: Ben Hutchings <ben@decadent.org.uk>,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: akpm@linux-foundation.org, Denis Kirjanov <kda@linux-powerpc.org>,
	YueHaibing <yuehaibing@huawei.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Lubomir Rintel <lkundrak@v3.sk>
Subject: Re: [PATCH 3.16 35/99] pxa168fb: Fix the function used to release some memory in an error handling path
Date: Thu, 21 May 2020 16:31:02 +0200	[thread overview]
Message-ID: <104d4c9f-48d8-19b1-d529-a34fcc1e5606@wanadoo.fr> (raw)
In-Reply-To: <95e4cf2d-5f50-e7bd-6e1e-a1d172eb24b6@wanadoo.fr>

Hi,

sorry for the noise, I have messed up my 
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ usage.
I thought I was looking at the 3.16.83 branch, but I was not.

The patch looks good to me.

CJ

Le 21/05/2020 à 16:09, Marion & Christophe JAILLET a écrit :
> Hi,
>
> I don't think that this one is applicable to 3.16.x
>
> The remove function and the error handling path of the probe function 
> both use 'dma_free_wc'.
> I've not look in details, but it looks consistent and the patch would 
> not apply as-is anyway.
>
> just my 2c.
>
> CJ
>
> Le 20/05/2020 à 16:14, Ben Hutchings a écrit :
>> 3.16.84-rc1 review patch.  If anyone has any objections, please let 
>> me know.
>>
>> ------------------
>>
>> From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>>
>> commit 3c911fe799d1c338d94b78e7182ad452c37af897 upstream.
>>
>> In the probe function, some resources are allocated using 
>> 'dma_alloc_wc()',
>> they should be released with 'dma_free_wc()', not 'dma_free_coherent()'.
>>
>> We already use 'dma_free_wc()' in the remove function, but not in the
>> error handling path of the probe function.
>>
>> Also, remove a useless 'PAGE_ALIGN()'. 'info->fix.smem_len' is already
>> PAGE_ALIGNed.
>>
>> Fixes: 638772c7553f ("fb: add support of LCD display controller on 
>> pxa168/910 (base layer)")
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>> Reviewed-by: Lubomir Rintel <lkundrak@v3.sk>
>> CC: YueHaibing <yuehaibing@huawei.com>
>> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
>> Link: 
>> https://patchwork.freedesktop.org/patch/msgid/20190831100024.3248-1-christophe.jaillet@wanadoo.fr
>> [bwh: Backported to 3.16: Use dma_free_writecombine().]
>> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
>> ---
>>   drivers/video/fbdev/pxa168fb.c | 6 +++---
>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> --- a/drivers/video/fbdev/pxa168fb.c
>> +++ b/drivers/video/fbdev/pxa168fb.c
>> @@ -772,8 +772,8 @@ failed_free_cmap:
>>   failed_free_clk:
>>       clk_disable(fbi->clk);
>>   failed_free_fbmem:
>> -    dma_free_coherent(fbi->dev, info->fix.smem_len,
>> -            info->screen_base, fbi->fb_start_dma);
>> +    dma_free_writecombine(fbi->dev, info->fix.smem_len,
>> +                  info->screen_base, fbi->fb_start_dma);
>>   failed_free_info:
>>       kfree(info);
>>   failed_put_clk:
>> @@ -809,7 +809,7 @@ static int pxa168fb_remove(struct platfo
>>         irq = platform_get_irq(pdev, 0);
>>   -    dma_free_writecombine(fbi->dev, PAGE_ALIGN(info->fix.smem_len),
>> +    dma_free_writecombine(fbi->dev, info->fix.smem_len,
>>                   info->screen_base, info->fix.smem_start);
>>         clk_disable(fbi->clk);
>>

  reply	other threads:[~2020-05-21 14:31 UTC|newest]

Thread overview: 112+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-20 14:13 [PATCH 3.16 00/99] 3.16.84-rc1 review Ben Hutchings
2020-05-20 14:13 ` [PATCH 3.16 01/99] fs/namespace.c: fix mountpoint reference counter race Ben Hutchings
2020-05-20 14:13 ` [PATCH 3.16 02/99] propagate_one(): mnt_set_mountpoint() needs mount_lock Ben Hutchings
2020-05-20 14:13 ` [PATCH 3.16 03/99] spi: spi-dw: Add lock protect dw_spi rx/tx to prevent concurrent calls Ben Hutchings
2020-05-20 14:13 ` [PATCH 3.16 04/99] padata: Remove unused but set variables Ben Hutchings
2020-05-20 14:13 ` [PATCH 3.16 05/99] padata: avoid race in reordering Ben Hutchings
2020-05-20 14:13 ` [PATCH 3.16 06/99] padata: get_next is never NULL Ben Hutchings
2020-05-20 14:13 ` [PATCH 3.16 07/99] padata: ensure the reorder timer callback runs on the correct CPU Ben Hutchings
2020-05-20 14:13 ` [PATCH 3.16 08/99] padata: ensure padata_do_serial() " Ben Hutchings
2020-05-20 14:13 ` [PATCH 3.16 09/99] padata: Replace delayed timer with immediate workqueue in padata_reorder Ben Hutchings
2020-05-20 14:13 ` [PATCH 3.16 10/99] padata: initialize pd->cpu with effective cpumask Ben Hutchings
2020-05-20 14:13 ` [PATCH 3.16 11/99] padata: Remove broken queue flushing Ben Hutchings
2020-05-20 14:13 ` [PATCH 3.16 12/99] padata: purge get_cpu and reorder_via_wq from padata_do_serial Ben Hutchings
2020-05-20 14:13 ` [PATCH 3.16 13/99] crypto: pcrypt - Fix user-after-free on module unload Ben Hutchings
2020-05-20 14:13 ` [PATCH 3.16 14/99] crypto: pcrypt - Do not clear MAY_SLEEP flag in original request Ben Hutchings
2020-05-20 14:13 ` [PATCH 3.16 15/99] padata: always acquire cpu_hotplug_lock before pinst->lock Ben Hutchings
2020-05-20 14:13 ` [PATCH 3.16 16/99] crypto: af_alg - Use bh_lock_sock in sk_destruct Ben Hutchings
2020-05-20 14:13 ` [PATCH 3.16 17/99] crypto: api - Check spawn->alg under lock in crypto_drop_spawn Ben Hutchings
2020-05-20 14:13 ` [PATCH 3.16 18/99] crypto: api - Fix race condition in crypto_spawn_alg Ben Hutchings
2020-05-20 14:13 ` [PATCH 3.16 19/99] mmc: spi: Toggle SPI polarity, do not hardcode it Ben Hutchings
2020-05-20 14:13 ` [PATCH 3.16 20/99] reiserfs: Fix memory leak of journal device string Ben Hutchings
2020-05-20 14:13 ` [PATCH 3.16 21/99] reiserfs: Fix spurious unlock in reiserfs_fill_super() error handling Ben Hutchings
2020-05-20 14:13 ` [PATCH 3.16 22/99] ath9k: fix storage endpoint lookup Ben Hutchings
2020-05-20 14:13 ` [PATCH 3.16 23/99] rsi: fix use-after-free on failed probe and unbind Ben Hutchings
2020-05-20 14:13 ` [PATCH 3.16 24/99] brcmfmac: Fix use after free in brcmf_sdio_readframes() Ben Hutchings
2020-05-20 14:13 ` [PATCH 3.16 25/99] brcmfmac: abort and release host after error Ben Hutchings
2020-05-20 14:13 ` [PATCH 3.16 26/99] brcmfmac: fix interface sanity check Ben Hutchings
2020-05-20 14:13 ` [PATCH 3.16 27/99] orinoco_usb: " Ben Hutchings
2020-05-20 14:13 ` [PATCH 3.16 28/99] rsi_91x_usb: " Ben Hutchings
2020-05-20 14:13 ` [PATCH 3.16 29/99] zd1211rw: fix storage endpoint lookup Ben Hutchings
2020-05-20 14:13 ` [PATCH 3.16 30/99] brcmfmac: Fix memory leak in brcmf_usbdev_qinit Ben Hutchings
2020-05-20 14:13 ` [PATCH 3.16 31/99] crypto: picoxcell - adjust the position of tasklet_init and fix missed tasklet_kill Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 32/99] scsi: qla2xxx: Fix mtcp dump collection failure Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 33/99] rtc: hym8563: Return -EINVAL if the time is known to be invalid Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 34/99] gianfar: Fix TX timestamping with a stacked DSA driver Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 35/99] pxa168fb: Fix the function used to release some memory in an error handling path Ben Hutchings
2020-05-21 14:09   ` Marion & Christophe JAILLET
2020-05-21 14:31     ` Marion & Christophe JAILLET [this message]
2020-05-21 20:28       ` Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 36/99] ALSA: sh: Fix compile warning wrt const Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 37/99] clk: tegra: Mark fuse clock as critical Ben Hutchings
2020-05-20 15:51   ` Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 38/99] ARM: tegra: Enable PLLP bypass during Tegra124 LP1 Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 39/99] media: iguanair: add sanity checks Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 40/99] media: iguanair: fix endpoint sanity check Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 41/99] ARM: dts: at91: sama5d3: fix maximum peripheral clock rates Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 42/99] ARM: dts: at91: sama5d3: define clock rate range for tcb1 Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 43/99] efi: Use early_mem*() instead of early_io*() Ben Hutchings
2020-05-20 15:53   ` Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 44/99] efi/x86: Map the entire EFI vendor string before copying it Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 45/99] PCI: Don't disable bridge BARs when assigning bus resources Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 46/99] power: supply: sbs-battery: Fix a signedness bug in sbs_get_battery_capacity() Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 47/99] dm space map common: fix to ensure new block isn't already in use Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 48/99] usb: dwc3: turn off VBUS when leaving host mode Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 49/99] usb: gadget: f_ncm: Use atomic_t to track in-flight request Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 50/99] usb: gadget: f_ecm: " Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 51/99] staging: wlan-ng: ensure error return is actually returned Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 52/99] nfs: NFS_SWAP should depend on SWAP Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 53/99] ubifs: Fix deadlock in concurrent bulk-read and writepage Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 54/99] x86/cpu: Update cached HLE state on write to TSX_CTRL_CPUID_CLEAR Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 55/99] jbd2: clear JBD2_ABORT flag before journal_reset to update log tail info when load journal Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 56/99] KVM: arm64: Only sign-extend MMIO up to register width Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 57/99] sparc32: fix struct ipc64_perm type definition Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 58/99] KVM: x86: Don't let userspace set host-reserved cr4 bits Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 59/99] KVM: nVMX: vmread should not set rflags to specify success in case of #PF Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 60/99] x86: kvm: avoid unused variable warning Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 61/99] KVM: x86/mmu: Apply max PA check for MMIO sptes to 32-bit KVM Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 62/99] USB: serial: ir-usb: add missing endpoint sanity check Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 63/99] USB: serial: ir-usb: fix link-speed handling Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 64/99] USB: serial: ir-usb: fix IrLAP framing Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 65/99] media: uvcvideo: Avoid cyclic entity chains due to malformed USB descriptors Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 66/99] KVM: PPC: Book3S HV: Uninit vCPU if vcore creation fails Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 67/99] KVM: PPC: Book3S PR: Free shared page if mmu initialization fails Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 68/99] KVM: x86: Free wbinvd_dirty_mask if vCPU creation fails Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 69/99] tracing: Fix very unlikely race of registering two stat tracers Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 70/99] tracing: Fix tracing_stat return values in error handling paths Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 71/99] jbd2: switch to use jbd2_journal_abort() when failed to submit the commit record Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 72/99] ext4, jbd2: ensure panic when aborting with zero errno Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 73/99] iwlegacy: ensure loop counter addr does not wrap and cause an infinite loop Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 74/99] CIFS: Fix task struct use-after-free on reconnect Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 75/99] net_sched: ematch: reject invalid TCF_EM_SIMPLE Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 76/99] KVM: x86: Protect x86_decode_insn from Spectre-v1/L1TF attacks Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 77/99] KVM: x86: Refactor picdev_write() to prevent " Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 78/99] KVM: x86: Protect ioapic_read_indirect() from " Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 79/99] KVM: x86: Protect ioapic_write_indirect() " Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 80/99] KVM: x86: Protect kvm_lapic_reg_write() " Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 81/99] kvm: x86: use macros to compute bank MSRs Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 82/99] KVM: x86: Protect MSR-based index computations from Spectre-v1/L1TF attacks in x86.c Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 83/99] KVM: x86: Protect DR-based index computations from Spectre-v1/L1TF attacks Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 84/99] KVM: Check for a bad hva before dropping into the ghc slow path Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 85/99] of: Add OF_DMA_DEFAULT_COHERENT & select it on powerpc Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 86/99] Btrfs: fix race between adding and putting tree mod seq elements and nodes Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 87/99] mm/mempolicy.c: fix out of bounds write in mpol_parse_str() Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 88/99] media/v4l2-core: set pages dirty upon releasing DMA buffers Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 89/99] tcp: clear tp->total_retrans in tcp_disconnect() Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 90/99] ALSA: dummy: Fix PCM format loop in proc output Ben Hutchings
2020-05-20 14:14 ` [PATCH 3.16 91/99] clocksource: Prevent double add_timer_on() for watchdog_timer Ben Hutchings
2020-05-20 14:15 ` [PATCH 3.16 92/99] cls_rsvp: fix rsvp_policy Ben Hutchings
2020-05-20 14:15 ` [PATCH 3.16 93/99] kconfig: fix broken dependency in randconfig-generated .config Ben Hutchings
2020-05-20 14:15 ` [PATCH 3.16 94/99] nfs: use kmap/kunmap directly Ben Hutchings
2020-05-20 14:15 ` [PATCH 3.16 95/99] NFS: Fix memory leaks and corruption in readdir Ben Hutchings
2020-05-20 14:15 ` [PATCH 3.16 96/99] NFS: Directory page cache pages need to be locked when read Ben Hutchings
2020-05-20 14:15 ` [PATCH 3.16 97/99] cifs: fail i/o on soft mounts if sessionsetup errors out Ben Hutchings
2020-05-20 14:15 ` [PATCH 3.16 98/99] bonding/alb: properly access headers in bond_alb_xmit() Ben Hutchings
2020-05-20 14:15 ` [PATCH 3.16 99/99] sunrpc: expiry_time should be seconds not timeval Ben Hutchings
2020-05-20 21:23 ` [PATCH 3.16 00/99] 3.16.84-rc1 review Guenter Roeck
2020-05-21  2:47   ` Chen-Yu Tsai
2020-05-21  7:40     ` Guenter Roeck
2020-05-21 20:22       ` Ben Hutchings
2020-05-21 20:20   ` Ben Hutchings
2020-05-21 22:37     ` Guenter Roeck
2020-05-22  0:00       ` Ben Hutchings

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=104d4c9f-48d8-19b1-d529-a34fcc1e5606@wanadoo.fr \
    --to=christophe.jaillet@wanadoo.fr \
    --cc=akpm@linux-foundation.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=ben@decadent.org.uk \
    --cc=kda@linux-powerpc.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkundrak@v3.sk \
    --cc=stable@vger.kernel.org \
    --cc=yuehaibing@huawei.com \
    /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).