Re: [bug report] tty: n_gsm: Fix packet data hex dump output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

* Dan Carpenter <dan.carpenter@xxxxxxxxxx> [220523 06:57]:
> Hello Tony Lindgren,
> 
> The patch 925ea0fa5277: "tty: n_gsm: Fix packet data hex dump output"
> from May 12, 2022, leads to the following Smatch static checker
> warning:
> 
> 	drivers/tty/n_gsm.c:720 gsm_data_kick()
> 	warn: sleeping in atomic context
> 
> drivers/tty/n_gsm.c
>     698 static void gsm_data_kick(struct gsm_mux *gsm, struct gsm_dlci *dlci)
>     699 {
>     700         struct gsm_msg *msg, *nmsg;
>     701         int len;
>     702 
>     703         list_for_each_entry_safe(msg, nmsg, &gsm->tx_list, list) {
>     704                 if (gsm->constipated && msg->addr)
>     705                         continue;
>     706                 if (gsm->encoding != 0) {
>     707                         gsm->txframe[0] = GSM1_SOF;
>     708                         len = gsm_stuff_frame(msg->data,
>     709                                                 gsm->txframe + 1, msg->len);
>     710                         gsm->txframe[len + 1] = GSM1_SOF;
>     711                         len += 2;
>     712                 } else {
>     713                         gsm->txframe[0] = GSM0_SOF;
>     714                         memcpy(gsm->txframe + 1 , msg->data, msg->len);
>     715                         gsm->txframe[msg->len + 1] = GSM0_SOF;
>     716                         len = msg->len + 2;
>     717                 }
>     718 
>     719                 if (debug & 4)
> --> 720                         gsm_hex_dump_bytes(__func__, gsm->txframe, len);
> 
> gsm_control_message() is holding a spin lock so gsm_hex_dump_bytes()
> might need to use GFP_ATOMIC instead of GFP_KERNEL.

OK thanks for the report. I'll send a patch for GFP_ATOMIC later on today.

Regards,

Tony



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux