lkml.org 
[lkml]   [2020]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH net] devlink: Add missing genlmsg_cancel() in devlink_nl_sb_port_pool_fill()
    From
    Date

    在 2020/11/13 1:51, Jakub Kicinski 写道:
    > On Wed, 11 Nov 2020 21:58:53 +0800 Wang Hai wrote:
    >> If sb_occ_port_pool_get() failed in devlink_nl_sb_port_pool_fill(),
    >> msg should be canceled by genlmsg_cancel().
    >> +++ b/net/core/devlink.c
    >> @@ -1447,8 +1447,10 @@ static int devlink_nl_sb_port_pool_fill(struct sk_buff *msg,
    [...]
    >> return err;
    > I guess the driver would have to return -EMSGSIZE for this to matter,
    > which is quite unlikely but we should indeed fix.
    >
    > Still, returning in the middle of the function with an epilogue is what
    > got use here in the first place, so please use a goto. E.g. like this:
    >
    [...]
    > static int devlink_nl_cmd_sb_port_pool_get_doit(struct sk_buff *skb,
    >
    > .

    Thanks for your review,  I just sent v2

    [PATCH v2 net] devlink: Add missing genlmsg_cancel() in
    devlink_nl_sb_port_pool_fill()

    \
     
     \ /
      Last update: 2020-11-13 13:21    [W:2.840 / U:0.184 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site