On 4/30/19 6:56 PM, Sasha Levin wrote:
> Hi,
>
> [This is an automated email]
>
> This commit has been processed because it contains a "Fixes:" tag,
> fixing commit: c5eb1190074c PCI / PM: Allow runtime PM without callback functions.
>
> The bot has tested the following trees: v5.0.10, v4.19.37.
>
> v5.0.10: Build OK!
> v4.19.37: Failed to apply! Possible dependencies:
> 6f108dd70d30 ("i2c: Clear client->irq in i2c_device_remove")
> 93b6604c5a66 ("i2c: Allow recovery of the initial IRQ by an I2C client device.")
>
>
> How should we proceed with this patch?
>
There's also dependency to commit
b9bb3fdf4e87 ("i2c: Remove unnecessary call to irq_find_mapping")
Without it 93b6604c5a66 doesn't apply.
Otherwise my patch don't have dependency into these so I can have
another version for 4.19 if needed.
I got impression from the mail thread for 6f108dd70d30 that it could be
also stable material but cannot really judge.
Charles: does your commits b9bb3fdf4e87 and 6f108dd70d30 with the fix
93b6604c5a66 qualify for 4.19? (background: my fix doesn't apply without
them but doesn't depend on them).
--
Jarkko
This is the start of the stable review cycle for the 5.0.13 release.
There are 32 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Mon 06 May 2019 10:24:23 AM UTC.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.0.13-rc1…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.0.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 5.0.13-rc1
Rafael J. Wysocki <rafael.j.wysocki(a)intel.com>
ath10k: Drop WARN_ON()s that always trigger during system resume
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
iwlwifi: mvm: properly check debugfs dentry before using it
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
ALSA: line6: use dynamic buffers
Jim Mattson <jmattson(a)google.com>
KVM: nVMX: Fix size checks in vmx_set_nested_state
Sean Christopherson <sean.j.christopherson(a)intel.com>
KVM: x86: Whitelist port 0x7e for pre-incrementing %rip
Jakub Kicinski <jakub.kicinski(a)netronome.com>
net/tls: fix copy to fragments in reencrypt
Jakub Kicinski <jakub.kicinski(a)netronome.com>
net/tls: don't copy negative amounts of data in reencrypt
Michael Chan <michael.chan(a)broadcom.com>
bnxt_en: Fix uninitialized variable usage in bnxt_rx_pkt().
Michael Chan <michael.chan(a)broadcom.com>
bnxt_en: Fix statistics context reservation logic.
Michael Chan <michael.chan(a)broadcom.com>
bnxt_en: Pass correct extended TX port statistics size to firmware.
Michael Chan <michael.chan(a)broadcom.com>
bnxt_en: Fix possible crash in bnxt_hwrm_ring_free() under error conditions.
Vasundhara Volam <vasundhara-v.volam(a)broadcom.com>
bnxt_en: Free short FW command HWRM memory in error path in bnxt_init_one()
Michael Chan <michael.chan(a)broadcom.com>
bnxt_en: Improve multicast address setup logic.
Eric Dumazet <edumazet(a)google.com>
udp: fix GRO packet of death
Paolo Abeni <pabeni(a)redhat.com>
udp: fix GRO reception in case of length mismatch
Eric Dumazet <edumazet(a)google.com>
tcp: add sanity tests in tcp_add_backlog()
David Ahern <dsahern(a)gmail.com>
selftests: fib_rule_tests: Fix icmp proto with ipv6
Willem de Bruijn <willemb(a)google.com>
packet: in recvmsg msg_name return at least sizeof sockaddr_ll
Willem de Bruijn <willemb(a)google.com>
packet: validate msg_namelen in send directly
Hangbin Liu <liuhangbin(a)gmail.com>
selftests: fib_rule_tests: print the result and return 1 if any tests failed
Xin Long <lucien.xin(a)gmail.com>
sctp: avoid running the sctp state machine recursively
David Howells <dhowells(a)redhat.com>
rxrpc: Fix net namespace cleanup
Jakub Kicinski <jakub.kicinski(a)netronome.com>
net/tls: avoid NULL pointer deref on nskb->sk in fallback
Andrew Lunn <andrew(a)lunn.ch>
net: phy: marvell: Fix buffer overrun with stats counters
Dan Carpenter <dan.carpenter(a)oracle.com>
net: dsa: bcm_sf2: fix buffer overflow doing set_rxnfc
Eric Dumazet <edumazet(a)google.com>
l2tp: use rcu_dereference_sk_user_data() in l2tp_udp_encap_recv()
Eric Dumazet <edumazet(a)google.com>
l2ip: fix possible use-after-free
Willem de Bruijn <willemb(a)google.com>
ipv6: invert flowlabel sharing check in process and user mode
Eric Dumazet <edumazet(a)google.com>
ipv6/flowlabel: wait rcu grace period before put_pid()
Eric Dumazet <edumazet(a)google.com>
ipv6: fix races in ip6_dst_destroy()
Martin KaFai Lau <kafai(a)fb.com>
ipv6: A few fixes on dereferencing rt->from
Shmulik Ladkani <shmulik(a)metanetworks.com>
ipv4: ip_do_fragment: Preserve skb_iif during fragmentation
-------------
Diffstat:
Makefile | 4 +-
arch/x86/include/uapi/asm/kvm.h | 1 +
arch/x86/kvm/vmx/nested.c | 4 +-
arch/x86/kvm/x86.c | 21 +++++++-
drivers/net/dsa/bcm_sf2_cfp.c | 6 +++
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 53 +++++++++++--------
drivers/net/phy/marvell.c | 6 ++-
drivers/net/wireless/ath/ath10k/mac.c | 4 +-
.../net/wireless/intel/iwlwifi/mvm/debugfs-vif.c | 5 ++
include/net/sctp/command.h | 1 -
net/ipv4/ip_output.c | 1 +
net/ipv4/tcp_ipv4.c | 13 ++++-
net/ipv4/udp_offload.c | 16 ++++--
net/ipv6/ip6_fib.c | 4 +-
net/ipv6/ip6_flowlabel.c | 22 +++++---
net/ipv6/route.c | 47 ++++++++---------
net/l2tp/l2tp_core.c | 10 ++--
net/packet/af_packet.c | 37 ++++++++-----
net/rxrpc/call_object.c | 32 ++++++------
net/sctp/sm_sideeffect.c | 29 -----------
net/sctp/sm_statefuns.c | 35 ++++++++++---
net/tls/tls_device.c | 39 ++++++++++----
net/tls/tls_device_fallback.c | 3 +-
sound/usb/line6/driver.c | 60 +++++++++++++---------
sound/usb/line6/podhd.c | 21 ++++----
sound/usb/line6/toneport.c | 24 ++++++---
tools/testing/selftests/net/fib_rule_tests.sh | 10 +++-
27 files changed, 309 insertions(+), 199 deletions(-)
This is the start of the stable review cycle for the 4.19.40 release.
There are 23 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Mon 06 May 2019 10:24:19 AM UTC.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.19.40-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.19.40-rc1
Rafael J. Wysocki <rafael.j.wysocki(a)intel.com>
ath10k: Drop WARN_ON()s that always trigger during system resume
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
ALSA: line6: use dynamic buffers
Jim Mattson <jmattson(a)google.com>
KVM: nVMX: Fix size checks in vmx_set_nested_state
Sean Christopherson <sean.j.christopherson(a)intel.com>
KVM: x86: Whitelist port 0x7e for pre-incrementing %rip
Jakub Kicinski <jakub.kicinski(a)netronome.com>
net/tls: fix copy to fragments in reencrypt
Jakub Kicinski <jakub.kicinski(a)netronome.com>
net/tls: don't copy negative amounts of data in reencrypt
Michael Chan <michael.chan(a)broadcom.com>
bnxt_en: Fix uninitialized variable usage in bnxt_rx_pkt().
Vasundhara Volam <vasundhara-v.volam(a)broadcom.com>
bnxt_en: Free short FW command HWRM memory in error path in bnxt_init_one()
Michael Chan <michael.chan(a)broadcom.com>
bnxt_en: Improve multicast address setup logic.
Willem de Bruijn <willemb(a)google.com>
packet: validate msg_namelen in send directly
Hangbin Liu <liuhangbin(a)gmail.com>
selftests: fib_rule_tests: print the result and return 1 if any tests failed
Xin Long <lucien.xin(a)gmail.com>
sctp: avoid running the sctp state machine recursively
David Howells <dhowells(a)redhat.com>
rxrpc: Fix net namespace cleanup
Jakub Kicinski <jakub.kicinski(a)netronome.com>
net/tls: avoid NULL pointer deref on nskb->sk in fallback
Andrew Lunn <andrew(a)lunn.ch>
net: phy: marvell: Fix buffer overrun with stats counters
Dan Carpenter <dan.carpenter(a)oracle.com>
net: dsa: bcm_sf2: fix buffer overflow doing set_rxnfc
Eric Dumazet <edumazet(a)google.com>
l2tp: use rcu_dereference_sk_user_data() in l2tp_udp_encap_recv()
Eric Dumazet <edumazet(a)google.com>
l2ip: fix possible use-after-free
Willem de Bruijn <willemb(a)google.com>
ipv6: invert flowlabel sharing check in process and user mode
Eric Dumazet <edumazet(a)google.com>
ipv6/flowlabel: wait rcu grace period before put_pid()
Eric Dumazet <edumazet(a)google.com>
ipv6: fix races in ip6_dst_destroy()
Martin KaFai Lau <kafai(a)fb.com>
ipv6: A few fixes on dereferencing rt->from
Shmulik Ladkani <shmulik(a)metanetworks.com>
ipv4: ip_do_fragment: Preserve skb_iif during fragmentation
-------------
Diffstat:
Makefile | 4 +-
arch/x86/include/uapi/asm/kvm.h | 1 +
arch/x86/kvm/vmx.c | 4 +-
arch/x86/kvm/x86.c | 21 +++++++++-
drivers/net/dsa/bcm_sf2_cfp.c | 6 +++
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 19 ++++++---
drivers/net/phy/marvell.c | 6 ++-
drivers/net/wireless/ath/ath10k/mac.c | 2 +-
include/net/sctp/command.h | 1 -
net/ipv4/ip_output.c | 1 +
net/ipv6/ip6_fib.c | 4 +-
net/ipv6/ip6_flowlabel.c | 22 ++++++----
net/ipv6/route.c | 47 +++++++++------------
net/l2tp/l2tp_core.c | 10 ++---
net/packet/af_packet.c | 24 ++++++-----
net/rxrpc/call_object.c | 32 +++++++-------
net/sctp/sm_sideeffect.c | 29 -------------
net/sctp/sm_statefuns.c | 35 ++++++++++++----
net/tls/tls_device.c | 39 ++++++++++++-----
net/tls/tls_device_fallback.c | 3 +-
sound/usb/line6/driver.c | 60 ++++++++++++++++-----------
sound/usb/line6/podhd.c | 21 ++++++----
sound/usb/line6/toneport.c | 24 ++++++++---
tools/testing/selftests/net/fib_rule_tests.sh | 6 +++
24 files changed, 248 insertions(+), 173 deletions(-)
At present, the flow of calculating AC timing of read/write cycle in SDR
mode is that:
At first, calculate high hold time which is valid for both read and write
cycle using the max value between tREH_min and tWH_min.
Secondly, calculate WE# pulse width using tWP_min.
Thridly, calculate RE# pulse width using the bigger one between tREA_max
and tRP_min.
But NAND SPEC shows that Controller should also meet write/read cycle time.
That is write cycle time should be more than tWC_min and read cycle should
be more than tRC_min. Obviously, we do not achieve that now.
This patch corrects the low level time calculation to meet minimum
read/write cycle time required. After getting the high hold time, WE# low
level time will be promised to meet tWP_min and tWC_min requirement,
and RE# low level time will be promised to meet tREA_max, tRP_min and
tRC_min requirement.
Fixes: edfee3619c49 ("mtd: nand: mtk: add ->setup_data_interface() hook")
Cc: stable(a)vger.kernel.org
Signed-off-by: Xiaolei Li <xiaolei.li(a)mediatek.com>
---
drivers/mtd/nand/raw/mtk_nand.c | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/drivers/mtd/nand/raw/mtk_nand.c b/drivers/mtd/nand/raw/mtk_nand.c
index b6b4602f5132..4fbb0c6ecae3 100644
--- a/drivers/mtd/nand/raw/mtk_nand.c
+++ b/drivers/mtd/nand/raw/mtk_nand.c
@@ -508,7 +508,8 @@ static int mtk_nfc_setup_data_interface(struct nand_chip *chip, int csline,
{
struct mtk_nfc *nfc = nand_get_controller_data(chip);
const struct nand_sdr_timings *timings;
- u32 rate, tpoecs, tprecs, tc2r, tw2r, twh, twst, trlt;
+ u32 rate, tpoecs, tprecs, tc2r, tw2r, twh, twst = 0, trlt = 0;
+ u32 thold;
timings = nand_get_sdr_timings(conf);
if (IS_ERR(timings))
@@ -544,11 +545,28 @@ static int mtk_nfc_setup_data_interface(struct nand_chip *chip, int csline,
twh = DIV_ROUND_UP(twh * rate, 1000000) - 1;
twh &= 0xf;
- twst = timings->tWP_min / 1000;
+ /* Calculate real WE#/RE# hold time in nanosecond */
+ thold = (twh + 1) * 1000000 / rate;
+ /* nanosecond to picosecond */
+ thold *= 1000;
+
+ /**
+ * WE# low level time should be expaned to meet WE# pulse time
+ * and WE# cycle time at the same time.
+ */
+ if (thold < timings->tWC_min)
+ twst = timings->tWC_min - thold;
+ twst = max(timings->tWP_min, twst) / 1000;
twst = DIV_ROUND_UP(twst * rate, 1000000) - 1;
twst &= 0xf;
- trlt = max(timings->tREA_max, timings->tRP_min) / 1000;
+ /**
+ * RE# low level time should be expaned to meet RE# pulse time,
+ * RE# access time and RE# cycle time at the same time.
+ */
+ if (thold < timings->tRC_min)
+ trlt = timings->tRC_min - thold;
+ trlt = max3(trlt, timings->tREA_max, timings->tRP_min) / 1000;
trlt = DIV_ROUND_UP(trlt * rate, 1000000) - 1;
trlt &= 0xf;
--
2.18.0
On Fri, May 3, 2019 at 10:08 PM Linus Torvalds
<torvalds(a)linux-foundation.org> wrote:
>
> I'll look at it tomorrow, but I think this actually makes unnecessary changes.
>
> In particular, I think we could keep the existing entry code almost unchanged with this whole approach.
So here's what I *think* should work. Note that I also removed your
test-case code, because it really didn't have a chance in hell of
working. Doing that
int3_emulate_call(regs, (unsigned long)&int3_magic);
inside of int3_exception_notify() could not possibly be valid, since
int3_emulate_call() returns the new pt_regs that need to be used, and
throwing it away is clearly wrong.
So you can't use a register_die_notifier() to try to intercept the
'int3' error and then do it manually, it needs to be done by the
ftrace_int3_handler() code that actually returns the new regs, and
where do_kernel_int3() will then return it to the low-level handler.
End result: I haven't actually tested this code, but I've looked
through the patch something like ten times without finding any new
errors.
I've also tried *very* hard to make the patch minimal, with the
exception of the comments, which I tried to make extensive for any of
the subtle cases.
But without testing, it's probably still buggy.
I have to say, I finally like the end result here. Maybe it's because
I got to make my mark and pee in the snow, but I will say that
(a) the actual entry code modifications really are minimal now
(b) the instruction emulation really is very simple and straightforward
(c) yes, we play some stack tricks (and yes, we play them differently
on x86-64 and x86-32), but the tricks are again at least
straightforward, and we never really change the layout of any stack.
So on the whole, I think this is about as good as it gets. Did I get
all the details actually right, and it _works_? I guess we'll see.
Linus