All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: Waiman Long <longman@redhat.com>
Cc: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	syzbot+53383ae265fb161ef488@syzkaller.appspotmail.com,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Will Deacon <will.deacon@arm.com>, Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH 4.19 36/63] locking/lockdep: Add debug_locks check in __lock_downgrade()
Date: Tue, 1 Oct 2019 18:20:38 -0400	[thread overview]
Message-ID: <20191001222038.GD17454@sasha-vm> (raw)
In-Reply-To: <b4e4de80-cabc-3de5-9fa7-8366a8582ba9@redhat.com>

On Mon, Sep 30, 2019 at 10:00:35AM -0400, Waiman Long wrote:
>On 9/29/19 9:46 PM, Tetsuo Handa wrote:
>> On 2019/09/30 9:28, Sasha Levin wrote:
>>> On Sun, Sep 29, 2019 at 11:43:38PM +0900, Tetsuo Handa wrote:
>>>> On 2019/09/29 22:54, Greg Kroah-Hartman wrote:
>>>>> From: Waiman Long <longman@redhat.com>
>>>>>
>>>>> [ Upstream commit 513e1073d52e55b8024b4f238a48de7587c64ccf ]
>>>>>
>>>>> Tetsuo Handa had reported he saw an incorrect "downgrading a read lock"
>>>>> warning right after a previous lockdep warning. It is likely that the
>>>>> previous warning turned off lock debugging causing the lockdep to have
>>>>> inconsistency states leading to the lock downgrade warning.
>>>>>
>>>>> Fix that by add a check for debug_locks at the beginning of
>>>>> __lock_downgrade().
>>>> Please drop "[PATCH 4.19 36/63] locking/lockdep: Add debug_locks check in __lock_downgrade()".
>>>> We had a revert patch shown below in the past.
>>> We had a revert in the stable trees, but that revert was incorrect.
>>>
>>> Take a look at commit 513e1073d52e55 upstream, it patches
>>> __lock_set_class() (even though the subject line says
>>> __lock_downgrade()). So this is not a backporting error as the revert
>>> said it is, but is rather the intended location to be patched.
>>>
>>> If this is actually wrong, then it should be addressed upstream first.
>>>
>> Hmm, upstream has two commits with same author, same date, same subject, different hash, different content.
>> I couldn't find from https://lkml.kernel.org/r/1547093005-26085-1-git-send-email-longman@redhat.com that
>> we want to patch both __lock_set_class() and __lock_downgrade(), but I found that the tip-bot has patched
>> __lock_downgrade() on "2019-01-21 11:29" and __lock_set_class() on "2019-02-04  8:56".
>> Seems that we by error patched both functions, though patching both functions should be harmless...
>>
>> 64aa348ed kernel/lockdep.c         (Peter Zijlstra            2008-08-11 09:30:21 +0200 4115) static int
>> 00ef9f734 kernel/lockdep.c         (Peter Zijlstra            2008-12-04 09:00:17 +0100 4116) __lock_set_class(struct lockdep_map *lock, const char *name,
>> 00ef9f734 kernel/lockdep.c         (Peter Zijlstra            2008-12-04 09:00:17 +0100 4117)            struct lock_class_key *key, unsigned int subclass,
>> 00ef9f734 kernel/lockdep.c         (Peter Zijlstra            2008-12-04 09:00:17 +0100 4118)            unsigned long ip)
>> 64aa348ed kernel/lockdep.c         (Peter Zijlstra            2008-08-11 09:30:21 +0200 4119) {
>> 64aa348ed kernel/lockdep.c         (Peter Zijlstra            2008-08-11 09:30:21 +0200 4120)   struct task_struct *curr = current;
>> 8c8889d8e kernel/locking/lockdep.c (Imre Deak                 2019-05-24 23:15:08 +0300 4121)   unsigned int depth, merged = 0;
>> 41c2c5b86 kernel/locking/lockdep.c (J. R. Okajima             2017-02-03 01:38:15 +0900 4122)   struct held_lock *hlock;
>> 64aa348ed kernel/lockdep.c         (Peter Zijlstra            2008-08-11 09:30:21 +0200 4123)   struct lock_class *class;
>> 64aa348ed kernel/lockdep.c         (Peter Zijlstra            2008-08-11 09:30:21 +0200 4124)   int i;
>> 64aa348ed kernel/lockdep.c         (Peter Zijlstra            2008-08-11 09:30:21 +0200 4125)
>> 513e1073d kernel/locking/lockdep.c (Waiman Long               2019-01-09 23:03:25 -0500 4126)   if (unlikely(!debug_locks))
>> 513e1073d kernel/locking/lockdep.c (Waiman Long               2019-01-09 23:03:25 -0500 4127)           return 0;
>> 513e1073d kernel/locking/lockdep.c (Waiman Long               2019-01-09 23:03:25 -0500 4128)
>>
>> 6419c4af7 kernel/locking/lockdep.c (J. R. Okajima             2017-02-03 01:38:17 +0900 4162) static int __lock_downgrade(struct lockdep_map *lock, unsigned long ip)
>> 6419c4af7 kernel/locking/lockdep.c (J. R. Okajima             2017-02-03 01:38:17 +0900 4163) {
>> 6419c4af7 kernel/locking/lockdep.c (J. R. Okajima             2017-02-03 01:38:17 +0900 4164)   struct task_struct *curr = current;
>> 8c8889d8e kernel/locking/lockdep.c (Imre Deak                 2019-05-24 23:15:08 +0300 4165)   unsigned int depth, merged = 0;
>> 6419c4af7 kernel/locking/lockdep.c (J. R. Okajima             2017-02-03 01:38:17 +0900 4166)   struct held_lock *hlock;
>> 6419c4af7 kernel/locking/lockdep.c (J. R. Okajima             2017-02-03 01:38:17 +0900 4167)   int i;
>> 6419c4af7 kernel/locking/lockdep.c (J. R. Okajima             2017-02-03 01:38:17 +0900 4168)
>> 714925805 kernel/locking/lockdep.c (Waiman Long               2019-01-09 23:03:25 -0500 4169)   if (unlikely(!debug_locks))
>> 714925805 kernel/locking/lockdep.c (Waiman Long               2019-01-09 23:03:25 -0500 4170)           return 0;
>> 714925805 kernel/locking/lockdep.c (Waiman Long               2019-01-09 23:03:25 -0500 4171)
>>
>> commit 513e1073d52e55b8024b4f238a48de7587c64ccf
>> Author: Waiman Long <longman@redhat.com>
>> Date:   Wed Jan 9 23:03:25 2019 -0500
>>
>>     locking/lockdep: Add debug_locks check in __lock_downgrade()
>>
>> commit 71492580571467fb7177aade19c18ce7486267f5
>> Author: Waiman Long <longman@redhat.com>
>> Date:   Wed Jan 9 23:03:25 2019 -0500
>>
>>     locking/lockdep: Add debug_locks check in __lock_downgrade()
>>
>As I had said before, it looks like the git-apply mixed up the location
>due to the fact that the hunks are exactly the same for both locations.
>So if the patch to be applied does not have the right line number, it
>will get applied to the wrong location first.

I very much agree, my point is that *both* patches are upstream right
now, and if one of those patches is wrong then it should be reverted
upstream, and we'd be happy to take the revert.

--
Thanks,
Sasha

  reply	other threads:[~2019-10-01 22:20 UTC|newest]

Thread overview: 85+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-29 13:53 [PATCH 4.19 00/63] 4.19.76-stable review Greg Kroah-Hartman
2019-09-29 13:53 ` [PATCH 4.19 01/63] Revert "Bluetooth: validate BLE connection interval updates" Greg Kroah-Hartman
2019-09-29 13:53 ` [PATCH 4.19 02/63] net/ibmvnic: free reset work of removed device from queue Greg Kroah-Hartman
2019-09-29 13:53 ` [PATCH 4.19 03/63] RDMA/restrack: Protect from reentry to resource return path Greg Kroah-Hartman
2019-09-29 13:53 ` [PATCH 4.19 04/63] powerpc/xive: Fix bogus error code returned by OPAL Greg Kroah-Hartman
2019-09-29 13:53 ` [PATCH 4.19 05/63] drm/amd/display: readd -msse2 to prevent Clang from emitting libcalls to undefined SW FP routines Greg Kroah-Hartman
2019-09-29 13:53 ` [PATCH 4.19 06/63] IB/core: Add an unbound WQ type to the new CQ API Greg Kroah-Hartman
2019-09-29 13:53 ` [PATCH 4.19 07/63] HID: prodikeys: Fix general protection fault during probe Greg Kroah-Hartman
2019-09-29 13:53 ` [PATCH 4.19 08/63] HID: sony: Fix memory corruption issue on cleanup Greg Kroah-Hartman
2019-09-29 13:53 ` [PATCH 4.19 09/63] HID: logitech: Fix general protection fault caused by Logitech driver Greg Kroah-Hartman
2019-09-29 13:53 ` [PATCH 4.19 10/63] HID: hidraw: Fix invalid read in hidraw_ioctl Greg Kroah-Hartman
2019-09-29 13:53 ` [PATCH 4.19 11/63] HID: Add quirk for HP X500 PIXART OEM mouse Greg Kroah-Hartman
2019-09-29 13:53 ` [PATCH 4.19 12/63] mtd: cfi_cmdset_0002: Use chip_good() to retry in do_write_oneword() Greg Kroah-Hartman
2019-09-29 13:53   ` Greg Kroah-Hartman
2019-09-29 13:53 ` [PATCH 4.19 13/63] crypto: talitos - fix missing break in switch statement Greg Kroah-Hartman
2019-09-29 13:53 ` [PATCH 4.19 14/63] CIFS: fix deadlock in cached root handling Greg Kroah-Hartman
2019-09-29 13:53 ` [PATCH 4.19 15/63] net/mlx5e: Set ECN for received packets using CQE indication Greg Kroah-Hartman
2019-09-29 13:53 ` [PATCH 4.19 16/63] net/mlx5e: dont set CHECKSUM_COMPLETE on SCTP packets Greg Kroah-Hartman
2019-09-29 13:53 ` [PATCH 4.19 17/63] mlx5: fix get_ip_proto() Greg Kroah-Hartman
2019-09-29 13:53 ` [PATCH 4.19 18/63] net/mlx5e: Allow reporting of checksum unnecessary Greg Kroah-Hartman
2019-09-29 13:53 ` [PATCH 4.19 19/63] net/mlx5e: XDP, Avoid checksum complete when XDP prog is loaded Greg Kroah-Hartman
2019-09-29 13:53 ` [PATCH 4.19 20/63] net/mlx5e: Rx, Fixup skb checksum for packets with tail padding Greg Kroah-Hartman
2019-09-29 13:53 ` [PATCH 4.19 21/63] net/mlx5e: Rx, Check ip headers sanity Greg Kroah-Hartman
2019-09-29 13:53 ` [PATCH 4.19 22/63] iwlwifi: mvm: send BCAST management frames to the right station Greg Kroah-Hartman
2019-09-29 13:53 ` [PATCH 4.19 23/63] iwlwifi: mvm: always init rs_fw with 20MHz bandwidth rates Greg Kroah-Hartman
2019-09-29 13:53 ` [PATCH 4.19 24/63] media: tvp5150: fix switch exit in set control handler Greg Kroah-Hartman
2019-09-29 13:53 ` [PATCH 4.19 25/63] ASoC: Intel: cht_bsw_max98090_ti: Enable codec clock once and keep it enabled Greg Kroah-Hartman
2019-09-29 13:53 ` [PATCH 4.19 26/63] ASoC: fsl: Fix of-node refcount unbalance in fsl_ssi_probe_from_dt() Greg Kroah-Hartman
2019-09-29 13:54 ` [PATCH 4.19 27/63] ALSA: usb-audio: Add Hiby device family to quirks for native DSD support Greg Kroah-Hartman
2019-09-29 13:54 ` [PATCH 4.19 28/63] ALSA: usb-audio: Add DSD support for EVGA NU Audio Greg Kroah-Hartman
2019-09-29 13:54 ` [PATCH 4.19 29/63] ALSA: dice: fix wrong packet parameter for Alesis iO26 Greg Kroah-Hartman
2019-09-29 13:54 ` [PATCH 4.19 30/63] ALSA: hda - Add laptop imic fixup for ASUS M9V laptop Greg Kroah-Hartman
2019-09-29 13:54 ` [PATCH 4.19 31/63] ALSA: hda - Apply AMD controller workaround for Raven platform Greg Kroah-Hartman
2019-09-29 13:54 ` [PATCH 4.19 32/63] objtool: Clobber user CFLAGS variable Greg Kroah-Hartman
2019-09-29 13:54 ` [PATCH 4.19 33/63] tpm: Fix TPM 1.2 Shutdown sequence to prevent future TPM operations Greg Kroah-Hartman
2019-09-30  6:13   ` Pavel Machek
2019-09-30 12:57     ` Sasha Levin
2019-10-01 20:56       ` Jarkko Sakkinen
2019-09-29 13:54 ` [PATCH 4.19 34/63] pinctrl: sprd: Use define directive for sprd_pinconf_params values Greg Kroah-Hartman
2019-09-29 13:54 ` [PATCH 4.19 35/63] power: supply: sysfs: ratelimit property read error message Greg Kroah-Hartman
2019-09-29 13:54 ` [PATCH 4.19 36/63] locking/lockdep: Add debug_locks check in __lock_downgrade() Greg Kroah-Hartman
2019-09-29 14:43   ` Tetsuo Handa
2019-09-29 14:49     ` Greg Kroah-Hartman
2019-09-30  0:28     ` Sasha Levin
2019-09-30  1:46       ` Tetsuo Handa
2019-09-30 11:35         ` Sasha Levin
2019-09-30 14:00         ` Waiman Long
2019-10-01 22:20           ` Sasha Levin [this message]
2019-10-02 13:16             ` Waiman Long
2019-09-29 13:54 ` [PATCH 4.19 37/63] locking/lockdep: Add debug_locks check in __lock_downgrade() - again Greg Kroah-Hartman
2019-09-29 13:54 ` [PATCH 4.19 38/63] scsi: qla2xxx: Turn off IOCB timeout timer on IOCB completion Greg Kroah-Hartman
2019-09-29 13:54 ` [PATCH 4.19 39/63] scsi: qla2xxx: Remove all rports if fabric scan retry fails Greg Kroah-Hartman
2019-09-29 13:54 ` [PATCH 4.19 40/63] scsi: qla2xxx: Return switch command on a timeout Greg Kroah-Hartman
2019-09-29 13:54 ` [PATCH 4.19 41/63] Revert "drm/amd/powerplay: Enable/Disable NBPSTATE on On/OFF of UVD" Greg Kroah-Hartman
2019-09-29 13:54 ` [PATCH 4.19 42/63] bpf: libbpf: retry loading program on EAGAIN Greg Kroah-Hartman
2019-09-29 13:54 ` [PATCH 4.19 43/63] irqchip/gic-v3-its: Fix LPI release for Multi-MSI devices Greg Kroah-Hartman
2019-09-29 13:54 ` [PATCH 4.19 44/63] f2fs: check all the data segments against all node ones Greg Kroah-Hartman
2019-09-29 13:54 ` [PATCH 4.19 45/63] PCI: hv: Avoid use of hv_pci_dev->pci_slot after freeing it Greg Kroah-Hartman
2019-09-29 13:54 ` [PATCH 4.19 46/63] bcache: remove redundant LIST_HEAD(journal) from run_cache_set() Greg Kroah-Hartman
2019-09-29 13:54 ` [PATCH 4.19 47/63] initramfs: dont free a non-existent initrd Greg Kroah-Hartman
2019-09-29 13:54 ` [PATCH 4.19 48/63] blk-mq: change gfp flags to GFP_NOIO in blk_mq_realloc_hw_ctxs Greg Kroah-Hartman
2019-09-29 13:54 ` [PATCH 4.19 49/63] blk-mq: move cancel of requeue_work to the front of blk_exit_queue Greg Kroah-Hartman
2019-09-29 13:54 ` [PATCH 4.19 50/63] Revert "f2fs: avoid out-of-range memory access" Greg Kroah-Hartman
2019-09-29 13:54 ` [PATCH 4.19 51/63] dm zoned: fix invalid memory access Greg Kroah-Hartman
2019-09-29 13:54 ` [PATCH 4.19 52/63] net/ibmvnic: Fix missing { in __ibmvnic_reset Greg Kroah-Hartman
2019-09-29 13:54 ` [PATCH 4.19 53/63] f2fs: fix to do sanity check on segment bitmap of LFS curseg Greg Kroah-Hartman
2019-09-30  7:21   ` Pavel Machek
2019-09-30  7:36     ` Chao Yu
2019-09-30 13:22       ` Sasha Levin
2019-09-29 13:54 ` [PATCH 4.19 54/63] drm: Flush output polling on shutdown Greg Kroah-Hartman
2019-09-29 13:54 ` [PATCH 4.19 55/63] net: dont warn in inet diag when IPV6 is disabled Greg Kroah-Hartman
2019-09-29 13:54 ` [PATCH 4.19 56/63] Bluetooth: btrtl: HCI reset on close for Realtek BT chip Greg Kroah-Hartman
2019-09-29 13:54 ` [PATCH 4.19 57/63] ACPI: video: Add new hw_changes_brightness quirk, set it on PB Easynote MZ35 Greg Kroah-Hartman
2019-09-29 13:54 ` [PATCH 4.19 58/63] drm/nouveau/disp/nv50-: fix center/aspect-corrected scaling Greg Kroah-Hartman
2019-09-29 13:54 ` [PATCH 4.19 59/63] xfs: dont crash on null attr fork xfs_bmapi_read Greg Kroah-Hartman
2019-09-29 13:54 ` [PATCH 4.19 60/63] netfilter: nft_socket: fix erroneous socket assignment Greg Kroah-Hartman
2019-09-29 13:54 ` [PATCH 4.19 61/63] Bluetooth: btrtl: Additional Realtek 8822CE Bluetooth devices Greg Kroah-Hartman
2019-09-29 13:54 ` [PATCH 4.19 62/63] net_sched: check cops->tcf_block in tc_bind_tclass() Greg Kroah-Hartman
2019-09-29 13:54 ` [PATCH 4.19 63/63] net/rds: An rds_sock is added too early to the hash table Greg Kroah-Hartman
2019-09-29 19:00 ` [PATCH 4.19 00/63] 4.19.76-stable review kernelci.org bot
2019-09-30 18:30 ` Guenter Roeck
2019-09-30 22:44 ` shuah
2019-10-01  1:05 ` Dan Rue
2019-10-01 14:58 ` Jon Hunter
2019-10-01 14:58   ` Jon Hunter

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=20191001222038.GD17454@sasha-vm \
    --to=sashal@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mingo@kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=peterz@infradead.org \
    --cc=stable@vger.kernel.org \
    --cc=syzbot+53383ae265fb161ef488@syzkaller.appspotmail.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=will.deacon@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.